diff options
author | Griffin Smith <root@gws.fyi> | 2022-10-10T18·48-0400 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2022-10-11T00·33+0000 |
commit | 4283f0139a82299c5240a25bb27ae84be3c99e13 (patch) | |
tree | 259c27f7bc5bc86f77d042b9b639c648210cf5d7 /tvix/eval/src/tests/tvix_tests | |
parent | 562c50fadd5e439eeed4039eb9dc119b07fe8722 (diff) |
feat(tvix/eval): Implement builtins.removeAttrs r/5102
Change-Id: I28910991a0108436a42ac7bf3458f9180a44154e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6928 Reviewed-by: Adam Joseph <adam@westernsemico.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-fail-remove.nix | 5 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-remove.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-remove.nix | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-fail-remove.nix b/tvix/eval/src/tests/tvix_tests/eval-fail-remove.nix new file mode 100644 index 000000000000..539e0eb0a6f6 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-fail-remove.nix @@ -0,0 +1,5 @@ +let { + attrs = {x = 123; y = 456;}; + + body = (removeAttrs attrs ["x"]).x; +} \ No newline at end of file diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-remove.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-remove.exp new file mode 100644 index 000000000000..8d38505c1686 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-remove.exp @@ -0,0 +1 @@ +456 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-remove.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-remove.nix new file mode 100644 index 000000000000..4ad5ba897fa7 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-remove.nix @@ -0,0 +1,5 @@ +let { + attrs = {x = 123; y = 456;}; + + body = (removeAttrs attrs ["x"]).y; +} \ No newline at end of file |