5 nix-build -A tests.trivial-builders.writeCBin
8 { lib, writeCBin, runCommand }:
11 pkg = writeCBin "test-script" ''
19 assert pkg.meta.mainProgram == "test-script";
20 runCommand "test-writeCBin" { } ''
22 echo Testing with getExe...
24 target=${lib.getExe pkg}
25 expected=${lib.escapeShellArg output}
27 if [[ "$got" != "$expected" ]]; then
28 echo "wrong output: expected $expected, got $got"
32 echo Testing with makeBinPath...
34 PATH="${lib.makeBinPath [ pkg ]}:$PATH"
36 if [[ "$got" != "$expected" ]]; then
37 echo "wrong output: expected $expected, got $got"