cleanup related to RAW's port of RUN-PROGRAM:
[sbcl.git] / tests / run-program.test.sh
1 #!/bin/sh
2
3 # tests related to SB-EXT:RUN-PROGRAM
4
5 sbcl --noinform --noprint --sysinit /dev/null --userinit /dev/null <<EOF
6   (let ((string (with-output-to-string (stream)
7                   (sb-ext:run-program "/bin/echo"
8                                       '("foo" "bar")
9                                       :output stream))))
10     (when (string= string "foo bar
11 ")
12       (sb-ext:quit :unix-status 52)))
13 EOF
14 if [ $? != 52 ]; then
15     echo test failed: $?
16     exit 1
17 fi
18
19 # known bugs:
20 #
21 #   sbcl-0.6.8:
22 #
23 #     (SB-EXT:RUN-PROGRAM "echo" NIL)
24 #     => error in function SB-IMPL::%ENUMERATE-SEARCH-LIST:
25 #        Undefined search list: path
26 #
27 #     (SB-EXT:RUN-PROGRAM "/bin/uname" '("-a") :OUTPUT :STREAM)
28 #     doesn't return a STREAM (the way doc string claims)
29
30 # success convention
31 exit 104