1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
guile/test-suite/standalone/test-language
Ludovic Courtès 72d4abda1d tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
Partly fixes <http://bugs.gnu.org/14042>.
Reported by Marc Girod <marc.girod@gmail.com>

* test-suite/standalone/test-language: Use a shell construct that
  /bin/sh on Solaris 10 can understand.
2013-04-14 15:46:56 +02:00

27 lines
813 B
Bash
Executable file

#!/bin/sh
set -e
# Make sure that code passed as `-c' or `-l' is evaluted using the
# right language.
# The default language in effect until `--language' is encountered is
# Scheme.
guile -c "(exit (= 3 (apply + '(1 2))))" --language=elisp
if guile -c "(= (funcall (symbol-function '+) 1 2) 3)" 2> /dev/null
then false; else true; fi
guile --language=elisp -c "(= (funcall (symbol-function '+) 1 2) 3)"
guile --language=ecmascript -c '(function (x) { return x * x; })(2);'
# Same with `-l'.
guile --no-auto-compile -l "$top_srcdir/module/ice-9/q.scm" -c 1
guile --no-auto-compile \
-l "$top_srcdir/module/ice-9/q.scm" \
--language=elisp \
-l "$srcdir/test-language.el" \
--language=ecmascript \
-l "$srcdir/test-language.js" \
--language=scheme \
-c 1