mirror of
https://github.com/NixOS/nix.git
synced 2024-10-31 22:30:52 +00:00
Test trace and addErrorContext
This commit is contained in:
parent
5ad263c26b
commit
7880973827
@ -2,6 +2,10 @@ source common.sh
|
|||||||
|
|
||||||
export TEST_VAR=foo # for eval-okay-getenv.nix
|
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
|
set +x
|
||||||
|
|
||||||
fail=0
|
fail=0
|
||||||
|
Loading…
Reference in New Issue
Block a user