test-language 813 B

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