aboutsummaryrefslogtreecommitdiffstats
path: root/test/testdata/eval-okay-dynamic-attrs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'test/testdata/eval-okay-dynamic-attrs.nix')
-rw-r--r--test/testdata/eval-okay-dynamic-attrs.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-dynamic-attrs.nix b/test/testdata/eval-okay-dynamic-attrs.nix
new file mode 100644
index 0000000..ee02ac7
--- /dev/null
+++ b/test/testdata/eval-okay-dynamic-attrs.nix
@@ -0,0 +1,17 @@
1let
2 aString = "a";
3
4 bString = "b";
5in {
6 hasAttrs = { a.b = null; } ? "${aString}".b;
7
8 selectAttrs = { a.b = true; }.a."${bString}";
9
10 selectOrAttrs = { }."${aString}" or true;
11
12 binds = { "${aString}"."${bString}c" = true; }.a.bc;
13
14 recBinds = rec { "${bString}" = a; a = true; }.b;
15
16 multiAttrs = { "${aString}" = true; "${bString}" = false; }.a;
17}