1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 08:40:19 +02:00

All examples are now built and tested on `make installcheck'

rather than `make check'.
This commit is contained in:
Martin Grabmüller 2001-07-24 10:43:34 +00:00
parent ba7562306f
commit 1321f4ff18
15 changed files with 87 additions and 58 deletions

View file

@ -19,6 +19,7 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
EXTRA_DIST = README simple-hello.scm hello fact
EXTRA_DIST = README simple-hello.scm hello fact check.test
TESTS = check.test
installcheck:
srcdir=$(srcdir) GUILE_LOAD_PATH=$(top_srcdir) $(srcdir)/check.test

View file

@ -11,12 +11,16 @@ else
exit 1
fi
if test "X$srcdir" = X; then
srcdir=.
fi
set -e
#
# simple-hello.scm
#
GUILE_LOAD_PATH=../.. $guile -s simple-hello.scm > TMP
$guile -s $srcdir/simple-hello.scm > TMP
cat <<EOF | diff -u - TMP
Hello, World!
EOF
@ -25,15 +29,15 @@ rm -f TMP
#
# hello
#
GUILE_LOAD_PATH=../.. $guile -s hello > TMP
$guile -s $srcdir/hello > TMP
echo "Hello, World!" | diff -u - TMP
rm -f TMP
GUILE_LOAD_PATH=../.. $guile -s hello --version > TMP
$guile -s $srcdir/hello --version > TMP
echo "hello 0.0.1" | diff -u - TMP
rm -f TMP
GUILE_LOAD_PATH=../.. $guile -s hello --help > TMP
$guile -s $srcdir/hello --help > TMP
cat <<EOF | diff -u - TMP
Usage: hello [options...]
--help, -h Show this usage information
@ -44,6 +48,6 @@ rm -f TMP
#
# fact
#
case `GUILE_LOAD_PATH=../.. $guile -s fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
case `$guile -s $srcdir/fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
# check.test ends here