5 nix-build -A tests.trivial-builders.writeCBin
15 pkg = writeCBin "test-script" ''
23 assert pkg.meta.mainProgram == "test-script";
24 runCommand "test-writeCBin" { } ''
26 echo Testing with getExe...
28 target=${lib.getExe pkg}
29 expected=${lib.escapeShellArg output}
31 if [[ "$got" != "$expected" ]]; then
32 echo "wrong output: expected $expected, got $got"
36 echo Testing with makeBinPath...
38 PATH="${lib.makeBinPath [ pkg ]}:$PATH"
40 if [[ "$got" != "$expected" ]]; then
41 echo "wrong output: expected $expected, got $got"