diff options
author | Rob Browning <rlb@defaultvalue.org> | 2003-11-19 21:39:07 +0000 |
---|---|---|
committer | Rob Browning <rlb@defaultvalue.org> | 2003-11-19 21:39:07 +0000 |
commit | b10b93de99606a762c9f07d81016dce1ab77700f (patch) | |
tree | 393a2eeb32c1732c955ffa8cc654a047a9fcb544 | |
parent | f24809dc2b51fce920507fb17059673ad40d6e47 (diff) | |
download | guile-b10b93de99606a762c9f07d81016dce1ab77700f.tar.gz |
* standalone/test-system-cmds: new test.
-rwxr-xr-x | test-suite/standalone/test-system-cmds | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test-suite/standalone/test-system-cmds b/test-suite/standalone/test-system-cmds new file mode 100755 index 000000000..d0e4a6991 --- /dev/null +++ b/test-suite/standalone/test-system-cmds @@ -0,0 +1,42 @@ +#!/bin/sh +exec guile -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:
\ No newline at end of file |