diff options
author | Vincent Ambo <mail@tazj.in> | 2022-10-22T13·27+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-10-22T18·20+0000 |
commit | 359444360b42c428ae10e1ad612a6f4966f11652 (patch) | |
tree | c69cb288678d9f9d07b603f3c7066163f077aa18 /tvix/eval/src/tests | |
parent | d4fa3152e92ef72d9ee050000b1fd4952203e383 (diff) |
test(tvix/eval): add a test for observing an infinite attribute set r/5176
Note that this test (ironically) fails if the observer is used (e.g. with --trace-runtime), but that's a separate issue. Change-Id: I952eaeac8b5a7acce9c66cd4744ec570280748e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7055 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.nix | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.exp new file mode 100644 index 000000000000..bbb332a5eea0 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.exp @@ -0,0 +1 @@ +[ "x" "y" ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.nix new file mode 100644 index 000000000000..684c88f80067 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-observe-infinite-attrs.nix @@ -0,0 +1,4 @@ +# The below attribute set is infinitely large, but we should be able +# to observe it as long as we don't access its entire value. + +let as = { x = 123; y = as; }; in builtins.attrNames as.y.y |