summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-07-09 21:22:52 +0200
committerJo-Philipp Wich <jo@mein.io>2021-07-11 15:49:14 +0200
commit498fe870251a9a73b2ed8d47d2292652bde84c3c (patch)
treec90b842c10834a73e0e1764b00d669772c0ad61e /tests
parentff52440341bcb8c61105ff144bfcb210315207e4 (diff)
main: refactor option parsing and VM setup
Set VM options and environment variables and load modules on the fly while parsing the cli options instead of aggregating all the values in memory first. This vastly reduces the amount of arguments we need to pass to the parse() function. Also rename parse() to compile() while we're at it. Also slightly adjust the usage output. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/cram/test_basic.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/cram/test_basic.t b/tests/cram/test_basic.t
index 940f1d1..7296b5d 100644
--- a/tests/cram/test_basic.t
+++ b/tests/cram/test_basic.t
@@ -10,12 +10,12 @@ setup common environment:
check that ucode provides exepected help:
$ ucode | sed 's/ucode-san/ucode/'
- == Usage ==
+ Usage
# ucode [-t] [-l] [-r] [-S] [-R] [-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)
+ -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