diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lang.sh | 3 | ||||
-rw-r--r-- | tests/lang/eval-okay-toxml.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-toxml.nix | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/tests/lang.sh b/tests/lang.sh index 18eb0278cfcc..54f01076371e 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 000000000000..379f3c07617e --- /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 000000000000..068c97a6c1b3 --- /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"; } |