about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2024-11-03T20·54+0100
committerBob van der Linden <bobvanderlinden@gmail.com>2024-11-04T10·39+0000
commitb6e524c7267f21173a29fdb9ad2bb72297299858 (patch)
treefe8872dbfe0da0ddd88da56542fd8b264651736a /tvix
parentf90f14042af71c753a0b1bdd06f07e4f425e30e1 (diff)
test(tvix/eval): test throw in __toString with toJSON r/8889
Change-Id: Ia4a9a04c7e157b6add94dc8901ffab35486fe344
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12731
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.exp2
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.nix3
2 files changed, 4 insertions, 1 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.exp
index ca00e3c049d6..5f97039f94d1 100644
--- a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.exp
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.exp
@@ -1 +1 @@
-[ false false false false ]
+[ false false false false false ]
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.nix
index 8ae5e48e9737..56fd1deb7b1b 100644
--- a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.nix
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-to-json-propagate-catchable.nix
@@ -10,5 +10,8 @@ map (e: (builtins.tryEval (builtins.toJSON e)).success) [
     x = 32;
     y = builtins.throw "second argument";
   }
+  {
+    __toString = _: builtins.throw "__toString a";
+  }
   # FIXME(raitobezarius): we would like to test coercions, i.e. `toFile` and `derivation` containing throwables.
 ]