From 1d60418132460c23b216a2f8a9e0ea8897d32ea4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 9 Jul 2021 19:35:19 +0200 Subject: vm: add API to control trace mode Add a public getter and setter to read and set the VM trace level respectively. Use the new API to control the trace mode with a newly introduced `-t` command line switch. Drop support for honouring the `TRACE` environment variable as host programs embedding ucode might want to prevent that behaviour or handle it differently. Signed-off-by: Jo-Philipp Wich --- tests/cram/test_basic.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/cram/test_basic.t b/tests/cram/test_basic.t index d866c49..940f1d1 100644 --- a/tests/cram/test_basic.t +++ b/tests/cram/test_basic.t @@ -12,11 +12,11 @@ check that ucode provides exepected help: $ ucode | sed 's/ucode-san/ucode/' == Usage == - # ucode [-d] [-l] [-r] [-S] [-R] [-e '[prefix=]{"var": ...}'] [-E [prefix=]env.json] {-i | -s "ucode script..."} + # ucode [-t] [-l] [-r] [-S] [-R] [-e '[prefix=]{"var": ...}'] [-E [prefix=]env.json] {-i | -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 + -t Enable VM execution tracing -l Do not strip leading block whitespace -r Do not trim trailing block newlines -S Enable strict mode -- cgit v1.2.3