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

« back to all changes in this revision

Viewing changes to examples/scripts/check.test

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-07-20 19:39:17 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090720193917-s0985l9wxihwoscl
Tags: 1.8.7+1-1ubuntu1
* Merge from Debian unstable, remaining changes: (LP: #401816)
  - 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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# must be run from this directory
4
 
guile=${GUILE-../../libguile/guile}
5
 
if [ -x $guile ] ; then
6
 
    :
7
 
else
8
 
    echo could not find guile interpreter.
9
 
    echo '(are you running this script from' `dirname $0` '?)'
10
 
    echo GUILE env var: ${GUILE-not set}
11
 
    exit 1
12
 
fi
13
 
 
14
 
if test "X$srcdir" = X; then
15
 
    srcdir=.
16
 
fi
17
 
 
18
 
set -e
19
 
 
20
 
#
21
 
# simple-hello.scm
22
 
#
23
 
$guile -s $srcdir/simple-hello.scm > TMP
24
 
cat <<EOF | diff -u - TMP
25
 
Hello, World!
26
 
EOF
27
 
rm -f TMP
28
 
 
29
 
#
30
 
# hello
31
 
#
32
 
$guile -s $srcdir/hello > TMP
33
 
echo "Hello, World!" | diff -u - TMP
34
 
rm -f TMP
35
 
 
36
 
$guile -s $srcdir/hello --version > TMP
37
 
echo "hello 0.0.1" | diff -u - TMP
38
 
rm -f TMP
39
 
 
40
 
$guile -s $srcdir/hello --help > TMP
41
 
cat <<EOF | diff -u - TMP
42
 
Usage: hello [options...]
43
 
  --help, -h           Show this usage information
44
 
  --version, -v        Show version information
45
 
EOF
46
 
rm -f TMP
47
 
 
48
 
#
49
 
# fact
50
 
#
51
 
case `$guile -s $srcdir/fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
52
 
 
53
 
# check.test ends here