summaryrefslogtreecommitdiffhomepage
path: root/tests/cram/test_basic.t
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-10-02 21:59:18 +0200
committerJo-Philipp Wich <jo@mein.io>2022-10-04 21:14:31 +0200
commit76d396d3781b9c6a32897b5d93769db2c9f84d36 (patch)
tree9ac67ae6b7d0d56f6bfdfe40299cddd4fe5c1eaf /tests/cram/test_basic.t
parent7bbba788dba3a5cd2339b81d8a62761e6dc83b7e (diff)
main: implement print mode
Introduce a new `-p` flag which works like `-e` but prints the final expression result. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/cram/test_basic.t')
-rw-r--r--tests/cram/test_basic.t7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/cram/test_basic.t b/tests/cram/test_basic.t
index c33dee9..d7f78a3 100644
--- a/tests/cram/test_basic.t
+++ b/tests/cram/test_basic.t
@@ -22,6 +22,9 @@ check that ucode provides exepected help:
-e "expression"
Execute the given expression as ucode program.
+ -p "expression"
+ Like `-e` but print the result of expression.
+
-t
Enable VM execution tracing.
@@ -85,7 +88,7 @@ check that ucode prints greetings:
check that ucode provides proper error messages:
$ touch lib.uc; ucode -l lib
- Require either -e expression or source file
+ Require either -e/-p expression or source file
[1]
$ ucode -l foo -e ' '
@@ -101,7 +104,7 @@ check that ucode provides proper error messages:
check that ucode can load fs module:
$ ucode -l fs
- Require either -e expression or source file
+ Require either -e/-p expression or source file
[1]
$ ucode -l fs -e ' '