1{ runCommandLocal, racket }:
2
3let
4 script = racket.writeScript "racket-test-nix-write-script-the-script" { } ''
5 #lang racket/base
6 (display "success")
7 (newline)
8 '';
9in
10
11runCommandLocal "racket-test-nix-write-script"
12 {
13 nativeBuildInputs = [ racket ];
14 }
15 ''
16 expectation="success"
17
18 output="$(${script})"
19
20 if test "$output" != "$expectation"; then
21 echo "output mismatch: expected ''${expectation}, but got ''${output}"
22 exit 1
23 fi
24
25 touch $out
26 ''