1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-10 03:10:25 +02:00
guile/test-suite/standalone/test-system-cmds
Neil Jerram f41529c37b Make test scripts check GUILE environment variable
So that they use the guile (or guile.exe, in the MinGW case) that was
just built, and not just any guile that can be found in the PATH.

* test-suite/standalone/test-asmobs: Use ${GUILE:-guile} instead of
  guile.

* test-suite/standalone/test-bad-identifiers: Ditto.

* test-suite/standalone/test-fast-slot-ref.in: Ditto.

* test-suite/standalone/test-require-extension: Ditto.

* test-suite/standalone/test-system-cmds: Ditto.

* test-suite/standalone/test-use-srfi.in: Ditto.
2010-03-05 23:31:06 +00:00

42 lines
No EOL
940 B
Bash
Executable file

#!/bin/sh
exec ${GUILE:-guile} -q -s "$0" "$@"
!#
(define (test-system-cmd)
(if (not (boolean? (system)))
(begin
(simple-format
#t
"test-system-cmds: (system) did not return a boolean\n")
(exit 1)))
(let ((rs (status:exit-val (system "guile -c '(exit 42)'"))))
(if (not (= 42 rs))
(begin
(simple-format
#t
"test-system-cmds: system exit status was ~S rather than 42\n"
rs)
(exit 1)))))
(define (test-system*-cmd)
(let ((rs (status:exit-val (system* "guile" "-c" "(exit 42)"))))
(if (not (= 42 rs))
(begin
(simple-format
#t
"test-system-cmds: system* exit status was ~S rather than 42\n"
rs)
(exit 1)))))
(if (defined? 'system)
(test-system-cmd))
(if (defined? 'system*)
(test-system*-cmd))
(exit 0)
;; Local Variables:
;; mode: scheme
;; End: