about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-03-31T13·35+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-03-31T13·35+0000
commitf061086a93400c34f19eb54f0b34637af9f0d9cb (patch)
treef9424e5a584389c00db9e95eb00c61cd4b43f9f8 /tests
parent13c2adc897b7f18e9a7784efbd46fabd995d2798 (diff)
* Fix the broken test for listToAttrs.
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/eval-okay-listtoattrs.exp1
-rw-r--r--tests/lang/eval-okay-listtoattrs.nix (renamed from tests/lang/eval-okay-listToAttrs.nix)6
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/lang/eval-okay-listtoattrs.exp b/tests/lang/eval-okay-listtoattrs.exp
new file mode 100644
index 000000000000..49adcc16f6ba
--- /dev/null
+++ b/tests/lang/eval-okay-listtoattrs.exp
@@ -0,0 +1 @@
+Str("AA",[])
diff --git a/tests/lang/eval-okay-listToAttrs.nix b/tests/lang/eval-okay-listtoattrs.nix
index f5eae92ccd98..d5cd726b0c64 100644
--- a/tests/lang/eval-okay-listToAttrs.nix
+++ b/tests/lang/eval-okay-listtoattrs.nix
@@ -1,8 +1,10 @@
 # this test shows how to use listToAttrs and that evaluation is still lazy (throw isn't called)
+with import ./lib.nix;
+
 let 
-  asi = attr: value : { inherit attr value; };
+  asi = name: value : { inherit name value; };
   list = [ ( asi "a" "A" ) ( asi "b" "B" ) ];
   a = builtins.listToAttrs list;
   b = builtins.listToAttrs ( list ++ list );
   r = builtins.listToAttrs [ (asi "result" [ a b ]) ( asi "throw" (throw "this should not be thrown")) ];
-in r.result
+in concat (map (x: x.a) r.result)