1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-15 10:10:21 +02:00
New test.
This commit is contained in:
Kevin Ryde 2006-12-08 21:20:28 +00:00
parent 14097f28ad
commit 2bf20ee77a

View file

@ -17,15 +17,51 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Test that running "guile --use-srfi=17" leaves the interactive REPL with
# the srfi-17 version of car.
# Test that two srfi numbers on the command line work.
#
# In guile 1.8.1 and earlier, and 1.6.8 and earlier, this failed because in
guile --use-srfi=1,10 >/dev/null <<EOF
(if (and (defined? 'partition)
(defined? 'define-reader-ctor))
(exit 0) ;; good
(exit 1)) ;; bad
EOF
if test $? = 0; then :; else
echo "guile --user-srfi=1,10 fails to run"
exit 1
fi
# Test that running "guile --use-srfi=1" leaves the interactive REPL with
# the srfi-1 version of iota.
#
# In guile 1.8.1 and earlier, and 1.6.8 and earlier, these failed because in
# `top-repl' the core bindings got ahead of anything --use-srfi gave.
#
guile --use-srfi=17 <<EOF
guile --use-srfi=1 >/dev/null <<EOF
(catch #t
(lambda ()
(iota 2 3 4))
(lambda args
(exit 1))) ;; bad
(exit 0) ;; good
EOF
if test $? = 0; then :; else
echo "guile --user-srfi=1 doesn't give SRFI-1 iota"
exit 1
fi
# Similar test on srfi-17 car, which differs in being a #:replacement. This
# exercises duplicates handling in `top-repl' versus `use-srfis' (in
# boot-9.scm).
#
guile --use-srfi=17 >/dev/null <<EOF
(if (procedure-with-setter? car)
(exit 0) ;; good
(exit 1)) ;; bad
EOF
if test $? = 0; then :; else
echo "guile --user-srfi=17 doesn't give SRFI-17 car"
exit 1
fi