about summary refs log tree commit diff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-22T11·02+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-22T11·02+0000
commitebade9ff8b8557bdae7cdaf9f70c12ceeb3dc02c (patch)
tree32a2ea8441ed340fd2a0b3b8ab29f5e51950480f /tests/lang
parent2d7636529f782b552b634497fd8ac876aae72fcc (diff)
* Check for duplicate attribute names / function arguments. `make
  check' now succeeds :-)
* An attribute set such as `{ foo = { enable = true; };
  foo.port = 23; }' now parses.  It was previously rejected, but I'm
  too lazy to implement the check.  (The only reason to reject it is
  that the reverse, `{ foo.port = 23; foo = { enable = true; }; }', is
  rejected, which is kind of ugly.)

Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-context.exp2
-rw-r--r--tests/lang/parse-fail-dup-attrs-7.nix9
-rw-r--r--tests/lang/parse-okay-dup-attrs-5.nix (renamed from tests/lang/parse-fail-dup-attrs-5.nix)0
3 files changed, 10 insertions, 1 deletions
diff --git a/tests/lang/eval-okay-context.exp b/tests/lang/eval-okay-context.exp
index 95a993654263..2f535bdbc454 100644
--- a/tests/lang/eval-okay-context.exp
+++ b/tests/lang/eval-okay-context.exp
@@ -1 +1 @@
-Str("foo eval-okay-context.nix bar",[])
+"foo eval-okay-context.nix bar"
diff --git a/tests/lang/parse-fail-dup-attrs-7.nix b/tests/lang/parse-fail-dup-attrs-7.nix
new file mode 100644
index 000000000000..bbc3eb08c0f6
--- /dev/null
+++ b/tests/lang/parse-fail-dup-attrs-7.nix
@@ -0,0 +1,9 @@
+rec {
+
+  x = 1;
+
+  as = {
+    inherit x;
+    inherit x;
+  };
+}
\ No newline at end of file
diff --git a/tests/lang/parse-fail-dup-attrs-5.nix b/tests/lang/parse-okay-dup-attrs-5.nix
index f4b9efd0c596..f4b9efd0c596 100644
--- a/tests/lang/parse-fail-dup-attrs-5.nix
+++ b/tests/lang/parse-okay-dup-attrs-5.nix