about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-29T17·38+0300
committertazjin <tazjin@tvl.su>2022-09-30T12·31+0000
commitf0f5435e25541c6f1ae17e77d44c54df881320cc (patch)
tree439e4d060e028bb5de56183569d814c102f5f46a /tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix
parentda1e3e9ac586747cf8d65a257f330706b051d06e (diff)
test(tvix/eval): reactivate nested key tests in plain attribute sets r/5003
Change-Id: Id25cde5a6562e1598dcbbf7945ecdfacac5faed7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6807
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix
new file mode 100644
index 000000000000..47dcec7a95f4
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-has-attrs.nix
@@ -0,0 +1,26 @@
+let
+  set = {
+    a.b.c = 123;
+    foo = {
+      bar = 23;
+    };
+    baz = 1;
+  };
+
+  tes = "random value";
+in
+
+[
+  (set ? a)
+  (set ? a.b)
+  (set ? a.b.c)
+  (set ? foo)
+  (set ? foo.bar)
+  (set.foo ? bar)
+  (set ? baz)
+  (set ? x)
+  (set ? x.y.z)
+  (tes ? bar)
+  (tes ? x.y.z)
+  (null ? null)
+]