1#!/bin/sh 2 3# Copyright (C) 2006 Free Software Foundation, Inc. 4# 5# This library is free software; you can redistribute it and/or modify it 6# under the terms of the GNU Lesser General Public License as published by 7# the Free Software Foundation; either version 2.1 of the License, or (at 8# your option) any later version. 9# 10# This library is distributed in the hope that it will be useful, but 11# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13# License for more details. 14# 15# You should have received a copy of the GNU Lesser General Public License 16# along with this library; if not, write to the Free Software Foundation, 17# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 19 20# Test that two srfi numbers on the command line work. 21# 22guile -q -l /home/ludo/src/guile/libguile/stack-limit-calibration.scm --use-srfi=1,10 >/dev/null <<EOF 23(if (and (defined? 'partition) 24 (defined? 'define-reader-ctor)) 25 (exit 0) ;; good 26 (exit 1)) ;; bad 27EOF 28if test $? = 0; then :; else 29 echo "guile --use-srfi=1,10 fails to run" 30 exit 1 31fi 32 33 34# Test that running "guile --use-srfi=1" leaves the interactive REPL with 35# the srfi-1 version of iota. 36# 37# In guile 1.8.1 and earlier, and 1.6.8 and earlier, these failed because in 38# `top-repl' the core bindings got ahead of anything --use-srfi gave. 39# 40 41guile -q -l /home/ludo/src/guile/libguile/stack-limit-calibration.scm --use-srfi=1 >/dev/null <<EOF 42(catch #t 43 (lambda () 44 (iota 2 3 4)) 45 (lambda args 46 (exit 1))) ;; bad 47(exit 0) ;; good 48EOF 49if test $? = 0; then :; else 50 echo "guile --use-srfi=1 doesn't give SRFI-1 iota" 51 exit 1 52fi 53 54 55# Similar test on srfi-17 car, which differs in being a #:replacement. This 56# exercises duplicates handling in `top-repl' versus `use-srfis' (in 57# boot-9.scm). 58# 59guile -q -l /home/ludo/src/guile/libguile/stack-limit-calibration.scm --use-srfi=17 >/dev/null <<EOF 60(if (procedure-with-setter? car) 61 (exit 0) ;; good 62 (exit 1)) ;; bad 63EOF 64if test $? = 0; then :; else 65 echo "guile --use-srfi=17 doesn't give SRFI-17 car" 66 exit 1 67fi 68