tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
[bpt/guile.git] / test-suite / standalone / test-language
CommitLineData
13ff681c
LC
1#!/bin/sh
2
3set -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.
10guile -c "(exit (= 3 (apply + '(1 2))))" --language=elisp
72d4abda
LC
11
12if guile -c "(= (funcall (symbol-function '+) 1 2) 3)" 2> /dev/null
13then false; else true; fi
13ff681c
LC
14
15guile --language=elisp -c "(= (funcall (symbol-function '+) 1 2) 3)"
16guile --language=ecmascript -c '(function (x) { return x * x; })(2);'
17
18# Same with `-l'.
19guile --no-auto-compile -l "$top_srcdir/module/ice-9/q.scm" -c 1
20guile --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