about summary refs log tree commit diff
path: root/tests/lang.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-26T18·12+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-26T18·12+0100
commit788097382743dccc2e6de02c0b0342c9bb693b37 (patch)
treec492e84fafbe614a4e09236925b3c33c4a0937f8 /tests/lang.sh
parent5ad263c26b5b9cc0ba067050e4a09b2491c9d40c (diff)
Test trace and addErrorContext
Diffstat (limited to 'tests/lang.sh')
-rw-r--r--tests/lang.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/lang.sh b/tests/lang.sh
index dfe807a6d1c0..bb3b9ca775c3 100644
--- a/tests/lang.sh
+++ b/tests/lang.sh
@@ -2,6 +2,10 @@ source common.sh
 
 export TEST_VAR=foo # for eval-okay-getenv.nix
 
+nix-instantiate --eval -E 'builtins.trace "Hello" 123' 2>&1 | grep -q Hello
+! nix-instantiate --show-trace --eval -E 'builtins.addErrorContext "Hello" 123' 2>&1 | grep -q Hello
+nix-instantiate --show-trace --eval -E 'builtins.addErrorContext "Hello" (throw "Foo")' 2>&1 | grep -q Hello
+
 set +x
 
 fail=0