aboutsummaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorFélix Baylac-Jacqué <felix@alternativebit.fr>2018-04-17 09:13:01 +0200
committerFélix Baylac-Jacqué <felix@alternativebit.fr>2018-04-17 09:13:01 +0200
commit10d33452e289ded93e192c7d99c1da08a52448e1 (patch)
tree6a8831f5f59133e2227402b6a8469f80a34f1099 /tests/lang
parentd5c9315d84fe3f38924f98d6d2fe9b8691bfe9b5 (diff)
nix-lang parser: Add mixed nested attrs tests.
Part of issue #2077
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/parse-fail-mixed-nested-attrs.nix4
-rw-r--r--tests/lang/parse-okay-mixed-nested-attrs-1.nix4
-rw-r--r--tests/lang/parse-okay-mixed-nested-attrs-2.nix4
-rw-r--r--tests/lang/parse-okay-nested-attrs.nix4
4 files changed, 16 insertions, 0 deletions
diff --git a/tests/lang/parse-fail-mixed-nested-attrs.nix b/tests/lang/parse-fail-mixed-nested-attrs.nix
new file mode 100644
index 000000000..458a7c545
--- /dev/null
+++ b/tests/lang/parse-fail-mixed-nested-attrs.nix
@@ -0,0 +1,4 @@
+{
+ x = { y = 3; z = 3; };
+ x.z = 3;
+}
diff --git a/tests/lang/parse-okay-mixed-nested-attrs-1.nix b/tests/lang/parse-okay-mixed-nested-attrs-1.nix
new file mode 100644
index 000000000..fd1001c8c
--- /dev/null
+++ b/tests/lang/parse-okay-mixed-nested-attrs-1.nix
@@ -0,0 +1,4 @@
+{
+ x = { y = 3; z = 3; };
+ x.q = 3;
+}
diff --git a/tests/lang/parse-okay-mixed-nested-attrs-2.nix b/tests/lang/parse-okay-mixed-nested-attrs-2.nix
new file mode 100644
index 000000000..ad066b680
--- /dev/null
+++ b/tests/lang/parse-okay-mixed-nested-attrs-2.nix
@@ -0,0 +1,4 @@
+{
+ x.q = 3;
+ x = { y = 3; z = 3; };
+}
diff --git a/tests/lang/parse-okay-nested-attrs.nix b/tests/lang/parse-okay-nested-attrs.nix
new file mode 100644
index 000000000..fd1001c8c
--- /dev/null
+++ b/tests/lang/parse-okay-nested-attrs.nix
@@ -0,0 +1,4 @@
+{
+ x = { y = 3; z = 3; };
+ x.q = 3;
+}