From 788097382743dccc2e6de02c0b0342c9bb693b37 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 26 Feb 2014 19:12:31 +0100 Subject: [PATCH] Test trace and addErrorContext --- tests/lang.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/lang.sh b/tests/lang.sh index dfe807a6d..bb3b9ca77 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