~peter-pearse/ubuntu/natty/guile-1.8/prop001

« back to all changes in this revision

Viewing changes to test-suite/standalone/test-use-srfi.in

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-06-04 19:01:38 UTC
  • mfrom: (8.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090604190138-1ao3t6sj31cqvcfe
Tags: 1.8.6+1-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Build with -Wno-error.
  - Build with thread support. Some guile-using programs like autogen need it.
  - Add debian/guile-1.8-libs.shlibs: Thread support breaks ABI, bump the soname.
* Dropped changes:
  - libltdl3-dev -> libltdl7-dev: current libltdl-dev Provides: both.
  - debian/patches/libtool-ftbfs.diff: integrated upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#
 
22
guile -q -l @top_builddir_absolute@/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
 
27
EOF
 
28
if test $? = 0; then :; else
 
29
  echo "guile --use-srfi=1,10 fails to run"
 
30
  exit 1
 
31
fi
 
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
 
 
41
guile -q -l @top_builddir_absolute@/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
 
48
EOF
 
49
if test $? = 0; then :; else
 
50
  echo "guile --use-srfi=1 doesn't give SRFI-1 iota"
 
51
  exit 1
 
52
fi
 
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
#
 
59
guile -q -l @top_builddir_absolute@/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
 
63
EOF
 
64
if test $? = 0; then :; else
 
65
  echo "guile --use-srfi=17 doesn't give SRFI-17 car"
 
66
  exit 1
 
67
fi