From: David Lichteblau Date: Tue, 9 Aug 2011 14:45:10 +0000 (+0200) Subject: Make test toplevel.sh usable X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=832ac1d6d923ced44c63486c8d5bf344795e54a1;p=sbcl.git Make test toplevel.sh usable Move toplevel.sh to toplevel.test.sh (where run-tests.sh expects it). Move one of the tests to script.test.sh (where needed helper files are set up). --- diff --git a/tests/script.test.sh b/tests/script.test.sh index e17761a..19fcc5f 100644 --- a/tests/script.test.sh +++ b/tests/script.test.sh @@ -76,6 +76,17 @@ then exit $EXIT_LOSE fi +# --script +cat > $tmpscript < $tmpout +if [ "`grep -c :SCRIPT-OK $tmpout`" != 1 ] ; then + echo "failed --script test using PRINT" + exit $EXIT_LOSE +fi + rm -f $tmpscript $tmpout $tmperr exit $EXIT_TEST_WIN diff --git a/tests/toplevel.sh b/tests/toplevel.sh deleted file mode 100644 index f7e055b..0000000 --- a/tests/toplevel.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# tests related to the toplevel interface: command line parsing -# and outer REPL - -# This software is part of the SBCL system. See the README file for -# more information. -# -# While most of SBCL is derived from the CMU CL system, the test -# files (like this one) were written from scratch after the fork -# from CMU CL. -# -# This software is in the public domain and is provided with -# absolutely no warranty. See the COPYING and CREDITS files for -# more information. - -. ./subr.sh - -use_test_subdirectory - -# Until sbcl-0.pre8, all --eval arguments were parsed before any of -# them were executed, making it impossible for --eval forms to refer -# to packages created by --eval forms. -run_sbcl --eval "(defpackage :foo)" --eval "(print 'foo::bar)" \ - < /dev/null > $TEST_FILESTEM -if [ "`grep -c FOO::BAR $TEST_FILESTEM`" != 1 ] ; then - echo failed DEFPACKAGE-then-PRINT from --eval form - exit $EXIT_LOSE -fi - -# --script -run_sbcl --script script-test.lisp --eval foo \ - < /dev/null > $TEST_FILESTEM -if [ "`grep -c :SCRIPT-OK $TEST_FILESTEM`" != 1 ] ; then - echo "failed --script test" - exit $EXIT_LOSE -fi -exit $EXIT_TEST_WIN diff --git a/tests/toplevel.test.sh b/tests/toplevel.test.sh new file mode 100644 index 0000000..1103354 --- /dev/null +++ b/tests/toplevel.test.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# tests related to the toplevel interface: command line parsing +# and outer REPL + +# This software is part of the SBCL system. See the README file for +# more information. +# +# While most of SBCL is derived from the CMU CL system, the test +# files (like this one) were written from scratch after the fork +# from CMU CL. +# +# This software is in the public domain and is provided with +# absolutely no warranty. See the COPYING and CREDITS files for +# more information. + +. ./subr.sh + +use_test_subdirectory + +# Until sbcl-0.pre8, all --eval arguments were parsed before any of +# them were executed, making it impossible for --eval forms to refer +# to packages created by --eval forms. +run_sbcl --eval "(defpackage :foo)" --eval "(print 'foo::bar)" \ + < /dev/null > $TEST_FILESTEM +if [ "`grep -c FOO::BAR $TEST_FILESTEM`" != 1 ] ; then + echo failed DEFPACKAGE-then-PRINT from --eval form + exit $EXIT_LOSE +fi + +exit $EXIT_TEST_WIN