diff options
Diffstat (limited to 'test/testdata/eval-okay-attrs5.nix')
-rw-r--r-- | test/testdata/eval-okay-attrs5.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-attrs5.nix b/test/testdata/eval-okay-attrs5.nix new file mode 100644 index 0000000..a4584cd --- /dev/null +++ b/test/testdata/eval-okay-attrs5.nix | |||
@@ -0,0 +1,21 @@ | |||
1 | with import ./lib.nix; | ||
2 | |||
3 | let | ||
4 | |||
5 | as = { x.y.z = 123; a.b.c = 456; }; | ||
6 | |||
7 | bs = { f-o-o.bar = "foo"; }; | ||
8 | |||
9 | or = x: y: x || y; | ||
10 | |||
11 | in | ||
12 | [ as.x.y.z | ||
13 | as.foo or "foo" | ||
14 | as.x.y.bla or as.a.b.c | ||
15 | as.a.b.c or as.x.y.z | ||
16 | as.x.y.bla or bs.f-o-o.bar or "xyzzy" | ||
17 | as.x.y.bla or bs.bar.foo or "xyzzy" | ||
18 | (123).bla or null.foo or "xyzzy" | ||
19 | # Backwards compatibility test. | ||
20 | (fold or [] [true false false]) | ||
21 | ] | ||