* 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
flags=$(cat lang/$i.flags)
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"
fail=1
elif ! diff lang/$i.out lang/$i.exp; then
echo "FAIL: evaluation result of $i not as expected"
fail=1
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
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"