test(tvix/eval): test throw in __toString with toJSON

Change-Id: Ia4a9a04c7e157b6add94dc8901ffab35486fe344
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12731
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Bob van der Linden 2024-11-03 21:54:53 +01:00
parent f90f14042a
commit b6e524c726
2 changed files with 4 additions and 1 deletions

View file

@ -1 +1 @@
[ false false false false ]
[ false false false false false ]

View file

@ -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.
]