about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-20T09·20+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-20T09·20+0000
commitd66ea83a763a36e7e7b9558b90abcfe09bec1b85 (patch)
tree6eaa7fc607da31c6ed3e221826cb1d6be43a6c9b /tests
parentf71ea9c911294ec72f52137175ad088a2f50ab97 (diff)
parentaac5fcfbb54ff64c593d8919f7f52025415ea996 (diff)
* Sync with the trunk.
Diffstat (limited to 'tests')
-rw-r--r--tests/lang.sh3
-rw-r--r--tests/lang/eval-okay-toxml.exp1
-rw-r--r--tests/lang/eval-okay-toxml.nix3
-rw-r--r--tests/lang/eval-okay-with.exp2
-rw-r--r--tests/lang/eval-okay-with.nix8
5 files changed, 14 insertions, 3 deletions
diff --git a/tests/lang.sh b/tests/lang.sh
index 18eb0278cf..54f0107637 100644
--- a/tests/lang.sh
+++ b/tests/lang.sh
@@ -54,7 +54,8 @@ for i in lang/eval-okay-*.nix; do
     fi
     
     if test -e lang/$i.exp.xml; then
-        if ! $nixinstantiate --eval-only --xml --strict lang/$i.nix > lang/$i.out.xml; then
+        if ! $nixinstantiate --eval-only --xml --no-location --strict \
+                lang/$i.nix > lang/$i.out.xml; then
             echo "FAIL: $i should evaluate"
             fail=1
         elif ! cmp -s lang/$i.out.xml lang/$i.exp.xml; then
diff --git a/tests/lang/eval-okay-toxml.exp b/tests/lang/eval-okay-toxml.exp
new file mode 100644
index 0000000000..379f3c0761
--- /dev/null
+++ b/tests/lang/eval-okay-toxml.exp
@@ -0,0 +1 @@
+Str("<?xml version='1.0' encoding='utf-8'?>\n<expr>\n  <attrs>\n    <attr name=\"a\">\n      <string value=\"s\" />\n    </attr>\n  </attrs>\n</expr>\n",[])
diff --git a/tests/lang/eval-okay-toxml.nix b/tests/lang/eval-okay-toxml.nix
new file mode 100644
index 0000000000..068c97a6c1
--- /dev/null
+++ b/tests/lang/eval-okay-toxml.nix
@@ -0,0 +1,3 @@
+# Make sure the expected XML output is produced; in particular, make sure it
+# doesn't contain source location information.
+builtins.toXML { a = "s"; }
diff --git a/tests/lang/eval-okay-with.exp b/tests/lang/eval-okay-with.exp
index 31e24293be..2c9bd8ba0e 100644
--- a/tests/lang/eval-okay-with.exp
+++ b/tests/lang/eval-okay-with.exp
@@ -1 +1 @@
-Str("xyzzybar",[])
+Str("xyzzybarxyzzybar",[])
diff --git a/tests/lang/eval-okay-with.nix b/tests/lang/eval-okay-with.nix
index ea4ea612de..033e8d3aba 100644
--- a/tests/lang/eval-okay-with.nix
+++ b/tests/lang/eval-okay-with.nix
@@ -7,7 +7,13 @@ let {
     b = "bar";
   };
 
+  bs = {
+    a = "bar";
+  };
+
   x = with as; a + b;
 
-  body = x;
+  y = with as; with bs; a + b;
+
+  body = x + y;
 }