* Update the expected test output (no longer an ATerm).

This commit is contained in:
Eelco Dolstra 2010-04-21 16:22:03 +00:00
parent 6f0f16497a
commit 7148df7971
35 changed files with 38 additions and 39 deletions

View file

@ -40,14 +40,13 @@ for i in lang/eval-okay-*.nix; do
if test -e lang/$i.flags; then if test -e lang/$i.flags; then
flags=$(cat lang/$i.flags) flags=$(cat lang/$i.flags)
fi fi
if ! $nixinstantiate $flags --eval-only lang/$i.nix > lang/$i.out; then if ! $nixinstantiate $flags --eval-only --strict lang/$i.nix > lang/$i.out; then
echo "FAIL: $i should evaluate" echo "FAIL: $i should evaluate"
fail=1 fail=1
elif ! diff lang/$i.out lang/$i.exp; then
echo "FAIL: evaluation result of $i not as expected"
fail=1
fi fi
#elif ! $aterm_bin/atdiff lang/$i.out lang/$i.exp; then
# echo "FAIL: evaluation result of $i not as expected"
# fail=1
#fi
fi fi
if test -e lang/$i.exp.xml; then if test -e lang/$i.exp.xml; then

View file

@ -1 +1 @@
Int(1275) 1275

View file

@ -1 +1 @@
Str("newxfoonewxy",[]) "newxfoonewxy"

View file

@ -1 +1 @@
Int(987) 987

View file

@ -1 +1 @@
Int(987) 987

View file

@ -1 +1 @@
Str("foo 22 80 itchyxac",[]) "foo 22 80 itchyxac"

View file

@ -1 +1 @@
Str("xyzzy!xyzzy!foobar",[]) "xyzzy!xyzzy!foobar"

View file

@ -1 +1 @@
Path("/foo") /foo

View file

@ -1 +1 @@
List([Int(1),Int(2),Int(3),Int(4),Int(5),Int(6),Int(7),Int(8),Int(9)]) [ 1 2 3 4 5 6 7 8 9 ]

View file

@ -1 +1 @@
Str("ab",[]) "ab"

View file

@ -1 +1 @@
Str("1234567",[]) "1234567"

View file

@ -1 +1 @@
Str("foobar",[]) "foobar"

View file

@ -1 +1 @@
Int(3) 3

View file

@ -1 +1 @@
Str("This is an indented multi-line string\nliteral. An amount of whitespace at\nthe start of each line matching the minimum\nindentation of all lines in the string\nliteral together will be removed. Thus,\nin this case four spaces will be\nstripped from each line, even though\n THIS LINE is indented six spaces.\n\nAlso, empty lines don't count in the\ndetermination of the indentation level (the\nprevious empty line has indentation 0, but\nit doesn't matter).\nIf the string starts with whitespace\n followed by a newline, it's stripped, but\n that's not the case here. Two spaces are\n stripped because of the \" \" at the start. \nThis line is indented\na bit further.\nAnti-quotations, like so, are\nalso allowed.\n The \\ is not special here.\n' can be followed by any character except another ', e.g. 'x'.\nLikewise for $, e.g. $$ or $varName.\nBut ' followed by ' is special, as is $ followed by {.\nIf you want them, use anti-quotations: '', ${.\n Tabs are not interpreted as whitespace (since we can't guess\n what tab settings are intended), so don't use them.\n\tThis line starts with a space and a tab, so only one\n space will be stripped from each line.\nAlso note that if the last line (just before the closing ' ')\nconsists only of whitespace, it's ignored. But here there is\nsome non-whitespace stuff, so the line isn't removed. \nThis shows a hacky way to preserve an empty line after the start.\nBut there's no reason to do so: you could just repeat the empty\nline.\n Similarly you can force an indentation level,\n in this case to 2 spaces. This works because the anti-quote\n is significant (not whitespace).\nstart on network-interfaces\n\nstart script\n\n rm -f /var/run/opengl-driver\n ln -sf 123 /var/run/opengl-driver\n\n rm -f /var/log/slim.log\n \nend script\n\nenv SLIM_CFGFILE=abc\nenv SLIM_THEMESDIR=def\nenv FONTCONFIG_FILE=/etc/fonts/fonts.conf \t\t\t\t# !!! cleanup\nenv XKB_BINDIR=foo/bin \t\t\t\t# Needed for the Xkb extension.\nenv LD_LIBRARY_PATH=libX11/lib:libXext/lib:/usr/lib/ # related to xorg-sys-opengl - needed to load libglx for (AI)GLX support (for compiz)\n\nenv XORG_DRI_DRIVER_PATH=nvidiaDrivers/X11R6/lib/modules/drivers/ \n\nexec slim/bin/slim\nEscaping of ' followed by ': ''\nEscaping of $ followed by {: ${\nAnd finally to interpret \\n etc. as in a string: \n, \r, \t.\nfoo\n'bla'\nbar\n",[]) "This is an indented multi-line string\nliteral. An amount of whitespace at\nthe start of each line matching the minimum\nindentation of all lines in the string\nliteral together will be removed. Thus,\nin this case four spaces will be\nstripped from each line, even though\n THIS LINE is indented six spaces.\n\nAlso, empty lines don't count in the\ndetermination of the indentation level (the\nprevious empty line has indentation 0, but\nit doesn't matter).\nIf the string starts with whitespace\n followed by a newline, it's stripped, but\n that's not the case here. Two spaces are\n stripped because of the \" \" at the start. \nThis line is indented\na bit further.\nAnti-quotations, like so, are\nalso allowed.\n The \\ is not special here.\n' can be followed by any character except another ', e.g. 'x'.\nLikewise for $, e.g. $$ or $varName.\nBut ' followed by ' is special, as is $ followed by {.\nIf you want them, use anti-quotations: '', ${.\n Tabs are not interpreted as whitespace (since we can't guess\n what tab settings are intended), so don't use them.\n\tThis line starts with a space and a tab, so only one\n space will be stripped from each line.\nAlso note that if the last line (just before the closing ' ')\nconsists only of whitespace, it's ignored. But here there is\nsome non-whitespace stuff, so the line isn't removed. \nThis shows a hacky way to preserve an empty line after the start.\nBut there's no reason to do so: you could just repeat the empty\nline.\n Similarly you can force an indentation level,\n in this case to 2 spaces. This works because the anti-quote\n is significant (not whitespace).\nstart on network-interfaces\n\nstart script\n\n rm -f /var/run/opengl-driver\n ln -sf 123 /var/run/opengl-driver\n\n rm -f /var/log/slim.log\n \nend script\n\nenv SLIM_CFGFILE=abc\nenv SLIM_THEMESDIR=def\nenv FONTCONFIG_FILE=/etc/fonts/fonts.conf \t\t\t\t# !!! cleanup\nenv XKB_BINDIR=foo/bin \t\t\t\t# Needed for the Xkb extension.\nenv LD_LIBRARY_PATH=libX11/lib:libXext/lib:/usr/lib/ # related to xorg-sys-opengl - needed to load libglx for (AI)GLX support (for compiz)\n\nenv XORG_DRI_DRIVER_PATH=nvidiaDrivers/X11R6/lib/modules/drivers/ \n\nexec slim/bin/slim\nEscaping of ' followed by ': ''\nEscaping of $ followed by {: ${\nAnd finally to interpret \\n etc. as in a string: \n, \r, \t.\nfoo\n'bla'\nbar\n"

View file

@ -1 +1 @@
Str("foobar",[]) "foobar"

View file

@ -1 +1 @@
Str("foobarblatest",[]) "foobarblatest"

View file

@ -1 +1 @@
Str("AA",[]) "AA"

View file

@ -1 +1 @@
Int(1) 1

View file

@ -1 +1 @@
Str("foobarblabarxyzzybar",[]) "foobarblabarxyzzybar"

View file

@ -1 +1 @@
Str("xyzzyfoobar",[]) "xyzzyfoobar"

View file

@ -1 +1 @@
Bool(True) true

View file

@ -1 +1 @@
Str("abcxyzDDDDEFijk",[]) "abcxyzDDDDEFijk"

View file

@ -1 +1 @@
Str("builtins.readFile ./eval-okay-readfile.nix\n",[]) "builtins.readFile ./eval-okay-readfile.nix\n"

View file

@ -1 +1 @@
Int(456) 456

View file

@ -1 +1 @@
Int(3) 3

View file

@ -1 +1 @@
Int(1) 1

View file

@ -1 +1 @@
Int(4) 4

View file

@ -1 +1 @@
Str("ccdd",[]) "ccdd"

View file

@ -1 +1 @@
Str("ccdd",[]) "ccdd"

View file

@ -1 +1 @@
Int(1) 1

View file

@ -1 +1 @@
Str("foobar/a/b/c/d/foo/xyzzy/foo.txt/../foo/x/yescape: \"quote\" \n \\end\nof\nlinefoobarblaatfoo$bar",[]) "foobar/a/b/c/d/foo/xyzzy/foo.txt/../foo/x/yescape: \"quote\" \n \\end\nof\nlinefoobarblaatfoo$bar"

View file

@ -1 +1 @@
Str("ooxfoobarybarzobaabb",[]) "ooxfoobarybarzobaabb"

View file

@ -1 +1 @@
Str("<?xml version='1.0' encoding='utf-8'?>\n<expr>\n <list>\n <string value=\"ab\" />\n <int value=\"10\" />\n <attrs>\n <attr name=\"x\">\n <string value=\"x\" />\n </attr>\n <attr name=\"y\">\n <string value=\"x\" />\n </attr>\n </attrs>\n </list>\n</expr>\n",[]) "<?xml version='1.0' encoding='utf-8'?>\n<expr>\n <list>\n <string value=\"ab\" />\n <int value=\"10\" />\n <attrs>\n <attr name=\"x\">\n <string value=\"x\" />\n </attr>\n <attr name=\"y\">\n <string value=\"x\" />\n </attr>\n </attrs>\n </list>\n</expr>\n"

View file

@ -1 +1 @@
Bool(True) true

View file

@ -1 +1 @@
Str("xyzzybarxyzzybar",[]) "xyzzybarxyzzybar"