3 # This software is part of the SBCL system. See the README file for
6 # While most of SBCL is derived from the CMU CL system, the test
7 # files (like this one) were written from scratch after the fork
10 # This software is in the public domain and is provided with
11 # absolutely no warranty. See the COPYING and CREDITS files for
18 tmpfilename="$TEST_FILESTEM.lisp"
20 cat > $tmpfilename <<EOF
22 (if (equal (concatenate 'string "Bivalent *STANDARD-INPUT*" (string #\newline))
23 (with-output-to-string (s)
24 (loop for byte = (read-byte *standard-input* nil)
25 while byte do (write-char (code-char byte) s))))
26 (exit :code $EXIT_LISP_WIN)
27 (exit :code $EXIT_LOSE))
29 run_sbcl --disable-debugger --load $tmpfilename <<EOF
30 Bivalent *STANDARD-INPUT*
32 check_status_maybe_lose bivalent-standard-input $?
34 cat > $tmpfilename <<EOF
36 (loop for char across "Bivalent *STANDARD-OUTPUT*"
37 do (write-byte (char-code char) *standard-output*))
38 (terpri *standard-output*)
39 (exit :code $EXIT_LISP_WIN)
41 run_sbcl --disable-debugger --load $tmpfilename > $tmpfilename.out
42 check_status_maybe_lose bivalent-standard-output $?
43 test_output=`cat $tmpfilename.out`
44 rm -f $tmpfilename.out
45 if [ 'Bivalent *STANDARD-OUTPUT*' != "$test_output" ]; then
46 echo "bad test output: '$test_output'"
50 cat > $tmpfilename <<EOF
52 (loop for char across "Bivalent *ERROR-OUTPUT*"
53 do (write-byte (char-code char) *error-output*))
54 (terpri *error-output*)
55 (exit :code $EXIT_LISP_WIN)
57 run_sbcl --disable-debugger --load $tmpfilename 2> $tmpfilename.out
58 check_status_maybe_lose bivalent-error-output $?
59 test_output=`cat $tmpfilename.out`
60 rm -f $tmpfilename.out
61 if [ 'Bivalent *ERROR-OUTPUT*' != "$test_output" ]; then
62 echo "bad test output: '$test_output'"