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