mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
* Sync with the trunk.
This commit is contained in:
commit
d66ea83a76
16 changed files with 107 additions and 34 deletions
|
@ -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
|
||||
|
|
1
tests/lang/eval-okay-toxml.exp
Normal file
1
tests/lang/eval-okay-toxml.exp
Normal file
|
@ -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",[])
|
3
tests/lang/eval-okay-toxml.nix
Normal file
3
tests/lang/eval-okay-toxml.nix
Normal file
|
@ -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"; }
|
|
@ -1 +1 @@
|
|||
Str("xyzzybar",[])
|
||||
Str("xyzzybarxyzzybar",[])
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue