| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# Make sure that code passed as `-c' or `-l' is evaluted using the |
| 6 |
# right language. |
| 7 |
|
| 8 |
# The default language in effect until `--language' is encountered is |
| 9 |
# Scheme. |
| 10 |
guile -c "(exit (= 3 (apply + '(1 2))))" --language=elisp |
| 11 |
|
| 12 |
if guile -c "(= (funcall (symbol-function '+) 1 2) 3)" 2> /dev/null |
| 13 |
then false; else true; fi |
| 14 |
|
| 15 |
guile --language=elisp -c "(= (funcall (symbol-function '+) 1 2) 3)" |
| 16 |
guile --language=ecmascript -c '(function (x) { return x * x; })(2);' |
| 17 |
|
| 18 |
# Same with `-l'. |
| 19 |
guile --no-auto-compile -l "$top_srcdir/module/ice-9/q.scm" -c 1 |
| 20 |
guile --no-auto-compile \ |
| 21 |
-l "$top_srcdir/module/ice-9/q.scm" \ |
| 22 |
--language=elisp \ |
| 23 |
-l "$srcdir/test-language.el" \ |
| 24 |
--language=ecmascript \ |
| 25 |
-l "$srcdir/test-language.js" \ |
| 26 |
--language=scheme \ |
| 27 |
-c 1 |