diff options
Diffstat (limited to 'tvix/eval/src/tests')
4 files changed, 19 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.exp new file mode 100644 index 000000000000..d81cc0710eb6 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.exp @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix new file mode 100644 index 000000000000..af227ae28e87 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix @@ -0,0 +1,8 @@ +# Tests using `with` on a set that does not yet exist on the stack. + +let + result = with set; value; + set = { + value = 42; + }; +in result diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-manual-rec.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-manual-rec.exp new file mode 100644 index 000000000000..d81cc0710eb6 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-manual-rec.exp @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-manual-rec.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-manual-rec.nix new file mode 100644 index 000000000000..8e1256d764e3 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-manual-rec.nix @@ -0,0 +1,9 @@ +# Manual desugaring of something similar to `rec`, to test lower level +# recursion primitives. + +let + set = with set; { + a = 21; + b = a * 2; + }; +in set.b |