1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00
guile/test-suite/standalone/test-use-srfi.in
Andy Wingo 23ccb831ff rely on getrlimit to DTRT, don't make stack calibration file
* libguile/measure-hwm.scm: Remove.

* .gitignore: Update for removal.

* test-suite/standalone/test-fast-slot-ref.in:
* test-suite/standalone/test-use-srfi.in:
* am/guilec:
* check-guile.in: Revert back to normal guile invocation.

* libguile/Makefile.am: Don't make a stack calibration file, as the
  getrlimit-based limit setting should work fine.
2009-03-27 15:51:16 -07:00

67 lines
1.9 KiB
Bash
Executable file

#!/bin/sh
# Copyright (C) 2006 Free Software Foundation, Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Test that two srfi numbers on the command line work.
#
guile -q --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 --use-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 -q --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 --use-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 -q --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 --use-srfi=17 doesn't give SRFI-17 car"
exit 1
fi