summaryrefslogtreecommitdiffhomepage
path: root/tests/cram/test_basic.t
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-11 18:03:42 +0200
committerGitHub <noreply@github.com>2021-07-11 18:03:42 +0200
commite4871c661f0bfb979f1b235d7b6e59b70ed1aca6 (patch)
tree40542b06a966366e2e8a3a0118e756874a838ce6 /tests/cram/test_basic.t
parentdad8f3aed4ca5f2f93e2be6f1243632439dec541 (diff)
parentd5b25f942147b09511d77d5470cd38a1e1643fb9 (diff)
Merge pull request #15 from jow-/c-api
C API wip
Diffstat (limited to 'tests/cram/test_basic.t')
-rw-r--r--tests/cram/test_basic.t17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/cram/test_basic.t b/tests/cram/test_basic.t
index aab5b16..2c22131 100644
--- a/tests/cram/test_basic.t
+++ b/tests/cram/test_basic.t
@@ -10,19 +10,20 @@ setup common environment:
check that ucode provides exepected help:
$ ucode | sed 's/ucode-san/ucode/'
- == Usage ==
+ Usage
- # ucode [-d] [-l] [-r] [-S] [-R] [-e '[prefix=]{"var": ...}'] [-E [prefix=]env.json] {-i <file> | -s "ucode script..."}
+ # ucode [-t] [-l] [-r] [-S] [-R] [-x function [-x ...]] [-e '[prefix=]{"var": ...}'] [-E [prefix=]env.json] {-i <file> | -s "ucode script..."}
-h, --help\tPrint this help (esc)
- -i file\tSpecify an ucode script to parse (esc)
- -s "ucode script..."\tSpecify an ucode fragment to parse (esc)
- -d Instead of executing the script, dump the resulting AST as dot
+ -i file\tExecute the given ucode script file (esc)
+ -s "ucode script..."\tExecute the given string as ucode script (esc)
+ -t Enable VM execution tracing
-l Do not strip leading block whitespace
-r Do not trim trailing block newlines
-S Enable strict mode
-R Enable raw code mode
-e Set global variables from given JSON object
-E Set global variables from given JSON file
+ -x Disable given function
-m Preload given module
check that ucode prints greetings:
@@ -38,15 +39,13 @@ check that ucode provides proper error messages:
$ ucode -m foo -s ' '
Runtime error: No module named 'foo' could be found
- At start of program
- [1]
+ [254]
$ touch moo; ucode -m foo -i moo
Runtime error: No module named 'foo' could be found
- At start of program
- [1]
+ [254]
check that ucode can load fs module: