about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-17T16·05+0300
committertazjin <tazjin@tvl.su>2022-09-17T18·58+0000
commit2f91543a42e14a790b5a5dabc008f8f3757d60db (patch)
treecdf00e4d1a30ec6173af1a41fb1d95c6162cbe32 /tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix
parent65dea58ef87dca688e8e1e57be8ebfe218919abf (diff)
test(tvix/eval): add a test for lazy evaluation of with namespace r/4888
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>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix
new file mode 100644
index 000000000000..e4377df97eeb
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-with.nix
@@ -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