test(tvix/eval): add a test for lazy evaluation of with namespace
Suggested by grfn in cl/6222 Change-Id: I8413af6404786bd43e5cb462a307cc236c4fb9ae Reviewed-on: https://cl.tvl.fyi/c/depot/+/6621 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
65dea58ef8
commit
2f91543a42
2 changed files with 7 additions and 0 deletions
1
tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.exp
Normal file
1
tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.exp
Normal file
|
@ -0,0 +1 @@
|
|||
42
|
6
tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix
Normal file
6
tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
# The 'namespace' of a with should only be evaluated if an identifier
|
||||
# from it is actually accessed.
|
||||
|
||||
with (builtins.throw "should not occur");
|
||||
|
||||
42
|
Loading…
Reference in a new issue