mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
Initial revision
This commit is contained in:
parent
fa6cd275b6
commit
5f6977fec4
1 changed files with 41 additions and 0 deletions
41
examples/scripts/check.test
Executable file
41
examples/scripts/check.test
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# must be run from this directory
|
||||||
|
guile=${GUILE-../../libguile/guile}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#
|
||||||
|
# simple-hello.scm
|
||||||
|
#
|
||||||
|
$guile -s simple-hello.scm > TMP
|
||||||
|
cat <<EOF | diff -u - TMP
|
||||||
|
Hello, World!
|
||||||
|
EOF
|
||||||
|
rm -f TMP
|
||||||
|
|
||||||
|
#
|
||||||
|
# hello
|
||||||
|
#
|
||||||
|
$guile -s hello > TMP
|
||||||
|
echo "Hello, World!" | diff -u - TMP
|
||||||
|
rm -f TMP
|
||||||
|
|
||||||
|
$guile -s hello --version > TMP
|
||||||
|
echo "hello 0.0.1" | diff -u - TMP
|
||||||
|
rm -f TMP
|
||||||
|
|
||||||
|
$guile -s hello --help > TMP
|
||||||
|
cat <<EOF | diff -u - TMP
|
||||||
|
Usage: hello [options...]
|
||||||
|
--help, -h Show this usage information
|
||||||
|
--version, -v Show version information
|
||||||
|
EOF
|
||||||
|
rm -f TMP
|
||||||
|
|
||||||
|
#
|
||||||
|
# fact
|
||||||
|
#
|
||||||
|
case `guile -s fact 5` in 120) ;; *) echo $0: error: fact 5 ;; esac
|
||||||
|
|
||||||
|
# check.test ends here
|
Loading…
Add table
Add a link
Reference in a new issue