diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-29T17·42+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-30T12·31+0000 |
commit | 746f1ee702a6508a6c7d18cc5c046aecc87a929f (patch) | |
tree | d1a74f84036a23ba42d5b654f3e97d05ece1ed24 /tvix/eval | |
parent | 6c5e83f8bca990235193a3ef3406a33d6fdf581d (diff) |
test(tvix/eval): add simple nested key tests in let & rec attrs r/5005
Change-Id: Icdc41ae383cd7cd1531c65c97d955bc59a56489a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6809 Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval')
4 files changed, 10 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-let.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-let.exp new file mode 100644 index 000000000000..6db47b033efb --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-let.exp @@ -0,0 +1 @@ +{ a = { b = 42; }; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-let.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-let.nix new file mode 100644 index 000000000000..c75b7130e1ba --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-let.nix @@ -0,0 +1,4 @@ +let + inner = 21; + set.a.b = inner * 2; +in set diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-rec.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-rec.exp new file mode 100644 index 000000000000..77eb325dde19 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-rec.exp @@ -0,0 +1 @@ +{ a = { b = { c = 42; }; }; outer = 21; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-rec.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-rec.nix new file mode 100644 index 000000000000..797d11108ff4 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-keys-rec.nix @@ -0,0 +1,4 @@ +rec { + outer = 21; + a.b.c = outer * 2; +} |