1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 04:43:53 +02:00

Fix tests

So all these years I was totally deluded about the meaning of "set
-e". You might think that it causes statements like "false && true" or
"! true" to fail, but it doesn't...
This commit is contained in:
Eelco Dolstra 2014-08-21 21:50:19 +02:00
parent 809ca33806
commit 3f80060500
9 changed files with 20 additions and 26 deletions

View file

@ -3,7 +3,7 @@ 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" 123' 2>&1 | grep -q Hello)
nix-instantiate --show-trace --eval -E 'builtins.addErrorContext "Hello" (throw "Foo")' 2>&1 | grep -q Hello
set +x