about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-12T04·36-0800
committerclbot <clbot@tvl.fyi>2023-12-12T14·55+0000
commite54eeda0ff4b777899491e2a753481e9c73af7df (patch)
treef0f061837d33ad562c7f15a5db06963cac57cf4e /tvix/eval
parent1ac57b0d1cdade99cd6cdf34211aa23e63db6f97 (diff)
test(tvix/eval): test branching on catchable defaults (b/343) r/7177
This is a test case for b/343, wherein tvix dies if you try to
branch on an argument whose defaulted value is a catchable.

Change-Id: I891ca825e39ad14dda9f220f06d9591874fcd45d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10287
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp1
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix1
2 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp
new file mode 100644
index 000000000000..c508d5366f70
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.exp
@@ -0,0 +1 @@
+false
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix
new file mode 100644
index 000000000000..0523cf864c3b
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-test-catchables-in-default-args.nix
@@ -0,0 +1 @@
+(builtins.tryEval (({ foo ? throw "up" }: if foo then 1 else 2) { })).success