From 7148df797174ff742fdd8cee3c2d92e6340ee930 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Apr 2010 16:22:03 +0000 Subject: [PATCH] * Update the expected test output (no longer an ATerm). --- tests/lang.sh | 9 ++++----- tests/lang/eval-okay-arithmetic.exp | 2 +- tests/lang/eval-okay-attrnames.exp | 2 +- tests/lang/eval-okay-attrs.exp | 2 +- tests/lang/eval-okay-attrs2.exp | 2 +- tests/lang/eval-okay-attrs3.exp | 2 +- tests/lang/eval-okay-autoargs.exp | 2 +- tests/lang/eval-okay-builtins.exp | 2 +- tests/lang/eval-okay-concat.exp | 2 +- tests/lang/eval-okay-empty-args.exp | 2 +- tests/lang/eval-okay-flatten.exp | 2 +- tests/lang/eval-okay-getenv.exp | 2 +- tests/lang/eval-okay-if.exp | 2 +- tests/lang/eval-okay-ind-string.exp | 2 +- tests/lang/eval-okay-let.exp | 2 +- tests/lang/eval-okay-list.exp | 2 +- tests/lang/eval-okay-listtoattrs.exp | 2 +- tests/lang/eval-okay-logic.exp | 2 +- tests/lang/eval-okay-map.exp | 2 +- tests/lang/eval-okay-new-let.exp | 2 +- tests/lang/eval-okay-pathexists.exp | 2 +- tests/lang/eval-okay-patterns.exp | 2 +- tests/lang/eval-okay-readfile.exp | 2 +- tests/lang/eval-okay-remove.exp | 2 +- tests/lang/eval-okay-scope-1.exp | 2 +- tests/lang/eval-okay-scope-2.exp | 2 +- tests/lang/eval-okay-scope-3.exp | 2 +- tests/lang/eval-okay-scope-4.exp | 2 +- tests/lang/eval-okay-scope-6.exp | 2 +- tests/lang/eval-okay-scope-7.exp | 2 +- tests/lang/eval-okay-string.exp | 2 +- tests/lang/eval-okay-substring.exp | 2 +- tests/lang/eval-okay-to-xml.exp | 2 +- tests/lang/eval-okay-versions.exp | 2 +- tests/lang/eval-okay-with.exp | 2 +- 35 files changed, 38 insertions(+), 39 deletions(-) diff --git a/tests/lang.sh b/tests/lang.sh index ab61b7b9d..eec33734c 100644 --- a/tests/lang.sh +++ b/tests/lang.sh @@ -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 diff --git a/tests/lang/eval-okay-arithmetic.exp b/tests/lang/eval-okay-arithmetic.exp index 433cb1c9b..9c113c6f7 100644 --- a/tests/lang/eval-okay-arithmetic.exp +++ b/tests/lang/eval-okay-arithmetic.exp @@ -1 +1 @@ -Int(1275) +1275 diff --git a/tests/lang/eval-okay-attrnames.exp b/tests/lang/eval-okay-attrnames.exp index 98af99a0c..b4aa387e0 100644 --- a/tests/lang/eval-okay-attrnames.exp +++ b/tests/lang/eval-okay-attrnames.exp @@ -1 +1 @@ -Str("newxfoonewxy",[]) +"newxfoonewxy" diff --git a/tests/lang/eval-okay-attrs.exp b/tests/lang/eval-okay-attrs.exp index add36384d..45b0f829e 100644 --- a/tests/lang/eval-okay-attrs.exp +++ b/tests/lang/eval-okay-attrs.exp @@ -1 +1 @@ -Int(987) \ No newline at end of file +987 diff --git a/tests/lang/eval-okay-attrs2.exp b/tests/lang/eval-okay-attrs2.exp index add36384d..45b0f829e 100644 --- a/tests/lang/eval-okay-attrs2.exp +++ b/tests/lang/eval-okay-attrs2.exp @@ -1 +1 @@ -Int(987) \ No newline at end of file +987 diff --git a/tests/lang/eval-okay-attrs3.exp b/tests/lang/eval-okay-attrs3.exp index d2c7555c1..19de4fdf7 100644 --- a/tests/lang/eval-okay-attrs3.exp +++ b/tests/lang/eval-okay-attrs3.exp @@ -1 +1 @@ -Str("foo 22 80 itchyxac",[]) +"foo 22 80 itchyxac" diff --git a/tests/lang/eval-okay-autoargs.exp b/tests/lang/eval-okay-autoargs.exp index 3b12bdd5e..7a8391786 100644 --- a/tests/lang/eval-okay-autoargs.exp +++ b/tests/lang/eval-okay-autoargs.exp @@ -1 +1 @@ -Str("xyzzy!xyzzy!foobar",[]) +"xyzzy!xyzzy!foobar" diff --git a/tests/lang/eval-okay-builtins.exp b/tests/lang/eval-okay-builtins.exp index f4f3ba81a..0661686d6 100644 --- a/tests/lang/eval-okay-builtins.exp +++ b/tests/lang/eval-okay-builtins.exp @@ -1 +1 @@ -Path("/foo") +/foo diff --git a/tests/lang/eval-okay-concat.exp b/tests/lang/eval-okay-concat.exp index 359ccef86..bb4bbd577 100644 --- a/tests/lang/eval-okay-concat.exp +++ b/tests/lang/eval-okay-concat.exp @@ -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 ] diff --git a/tests/lang/eval-okay-empty-args.exp b/tests/lang/eval-okay-empty-args.exp index c386bbc80..cb5537d5d 100644 --- a/tests/lang/eval-okay-empty-args.exp +++ b/tests/lang/eval-okay-empty-args.exp @@ -1 +1 @@ -Str("ab",[]) +"ab" diff --git a/tests/lang/eval-okay-flatten.exp b/tests/lang/eval-okay-flatten.exp index 50c91bee5..b979b2b8b 100644 --- a/tests/lang/eval-okay-flatten.exp +++ b/tests/lang/eval-okay-flatten.exp @@ -1 +1 @@ -Str("1234567",[]) +"1234567" diff --git a/tests/lang/eval-okay-getenv.exp b/tests/lang/eval-okay-getenv.exp index 7c3659b97..14e24d419 100644 --- a/tests/lang/eval-okay-getenv.exp +++ b/tests/lang/eval-okay-getenv.exp @@ -1 +1 @@ -Str("foobar",[]) +"foobar" diff --git a/tests/lang/eval-okay-if.exp b/tests/lang/eval-okay-if.exp index 8b99801d3..00750edc0 100644 --- a/tests/lang/eval-okay-if.exp +++ b/tests/lang/eval-okay-if.exp @@ -1 +1 @@ -Int(3) \ No newline at end of file +3 diff --git a/tests/lang/eval-okay-ind-string.exp b/tests/lang/eval-okay-ind-string.exp index b8d2f5b39..886219dcf 100644 --- a/tests/lang/eval-okay-ind-string.exp +++ b/tests/lang/eval-okay-ind-string.exp @@ -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" diff --git a/tests/lang/eval-okay-let.exp b/tests/lang/eval-okay-let.exp index 7c3659b97..14e24d419 100644 --- a/tests/lang/eval-okay-let.exp +++ b/tests/lang/eval-okay-let.exp @@ -1 +1 @@ -Str("foobar",[]) +"foobar" diff --git a/tests/lang/eval-okay-list.exp b/tests/lang/eval-okay-list.exp index b9cad67dd..f784f26d8 100644 --- a/tests/lang/eval-okay-list.exp +++ b/tests/lang/eval-okay-list.exp @@ -1 +1 @@ -Str("foobarblatest",[]) +"foobarblatest" diff --git a/tests/lang/eval-okay-listtoattrs.exp b/tests/lang/eval-okay-listtoattrs.exp index 49adcc16f..11d29b588 100644 --- a/tests/lang/eval-okay-listtoattrs.exp +++ b/tests/lang/eval-okay-listtoattrs.exp @@ -1 +1 @@ -Str("AA",[]) +"AA" diff --git a/tests/lang/eval-okay-logic.exp b/tests/lang/eval-okay-logic.exp index f1161b8d5..d00491fd7 100644 --- a/tests/lang/eval-okay-logic.exp +++ b/tests/lang/eval-okay-logic.exp @@ -1 +1 @@ -Int(1) \ No newline at end of file +1 diff --git a/tests/lang/eval-okay-map.exp b/tests/lang/eval-okay-map.exp index 2d9456dc0..dbb64f717 100644 --- a/tests/lang/eval-okay-map.exp +++ b/tests/lang/eval-okay-map.exp @@ -1 +1 @@ -Str("foobarblabarxyzzybar",[]) +"foobarblabarxyzzybar" diff --git a/tests/lang/eval-okay-new-let.exp b/tests/lang/eval-okay-new-let.exp index f10a34e71..f98b38807 100644 --- a/tests/lang/eval-okay-new-let.exp +++ b/tests/lang/eval-okay-new-let.exp @@ -1 +1 @@ -Str("xyzzyfoobar",[]) +"xyzzyfoobar" diff --git a/tests/lang/eval-okay-pathexists.exp b/tests/lang/eval-okay-pathexists.exp index 2015847b6..27ba77dda 100644 --- a/tests/lang/eval-okay-pathexists.exp +++ b/tests/lang/eval-okay-pathexists.exp @@ -1 +1 @@ -Bool(True) +true diff --git a/tests/lang/eval-okay-patterns.exp b/tests/lang/eval-okay-patterns.exp index d497e9f2b..a4304010f 100644 --- a/tests/lang/eval-okay-patterns.exp +++ b/tests/lang/eval-okay-patterns.exp @@ -1 +1 @@ -Str("abcxyzDDDDEFijk",[]) +"abcxyzDDDDEFijk" diff --git a/tests/lang/eval-okay-readfile.exp b/tests/lang/eval-okay-readfile.exp index 979771c7a..a2c87d0c4 100644 --- a/tests/lang/eval-okay-readfile.exp +++ b/tests/lang/eval-okay-readfile.exp @@ -1 +1 @@ -Str("builtins.readFile ./eval-okay-readfile.nix\n",[]) +"builtins.readFile ./eval-okay-readfile.nix\n" diff --git a/tests/lang/eval-okay-remove.exp b/tests/lang/eval-okay-remove.exp index e22e6b1b2..8d38505c1 100644 --- a/tests/lang/eval-okay-remove.exp +++ b/tests/lang/eval-okay-remove.exp @@ -1 +1 @@ -Int(456) +456 diff --git a/tests/lang/eval-okay-scope-1.exp b/tests/lang/eval-okay-scope-1.exp index 7da0e4219..00750edc0 100644 --- a/tests/lang/eval-okay-scope-1.exp +++ b/tests/lang/eval-okay-scope-1.exp @@ -1 +1 @@ -Int(3) +3 diff --git a/tests/lang/eval-okay-scope-2.exp b/tests/lang/eval-okay-scope-2.exp index 067d2b746..d00491fd7 100644 --- a/tests/lang/eval-okay-scope-2.exp +++ b/tests/lang/eval-okay-scope-2.exp @@ -1 +1 @@ -Int(1) +1 diff --git a/tests/lang/eval-okay-scope-3.exp b/tests/lang/eval-okay-scope-3.exp index 65c1faee2..b8626c4cf 100644 --- a/tests/lang/eval-okay-scope-3.exp +++ b/tests/lang/eval-okay-scope-3.exp @@ -1 +1 @@ -Int(4) +4 diff --git a/tests/lang/eval-okay-scope-4.exp b/tests/lang/eval-okay-scope-4.exp index ea9580603..00ff03a46 100644 --- a/tests/lang/eval-okay-scope-4.exp +++ b/tests/lang/eval-okay-scope-4.exp @@ -1 +1 @@ -Str("ccdd",[]) +"ccdd" diff --git a/tests/lang/eval-okay-scope-6.exp b/tests/lang/eval-okay-scope-6.exp index ea9580603..00ff03a46 100644 --- a/tests/lang/eval-okay-scope-6.exp +++ b/tests/lang/eval-okay-scope-6.exp @@ -1 +1 @@ -Str("ccdd",[]) +"ccdd" diff --git a/tests/lang/eval-okay-scope-7.exp b/tests/lang/eval-okay-scope-7.exp index 067d2b746..d00491fd7 100644 --- a/tests/lang/eval-okay-scope-7.exp +++ b/tests/lang/eval-okay-scope-7.exp @@ -1 +1 @@ -Int(1) +1 diff --git a/tests/lang/eval-okay-string.exp b/tests/lang/eval-okay-string.exp index 8249c7c8d..607920247 100644 --- a/tests/lang/eval-okay-string.exp +++ b/tests/lang/eval-okay-string.exp @@ -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" diff --git a/tests/lang/eval-okay-substring.exp b/tests/lang/eval-okay-substring.exp index d6098476b..d936b7e96 100644 --- a/tests/lang/eval-okay-substring.exp +++ b/tests/lang/eval-okay-substring.exp @@ -1 +1 @@ -Str("ooxfoobarybarzobaabb",[]) +"ooxfoobarybarzobaabb" diff --git a/tests/lang/eval-okay-to-xml.exp b/tests/lang/eval-okay-to-xml.exp index 0a4d1884e..634a841eb 100644 --- a/tests/lang/eval-okay-to-xml.exp +++ b/tests/lang/eval-okay-to-xml.exp @@ -1 +1 @@ -Str("\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n",[]) +"\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n" diff --git a/tests/lang/eval-okay-versions.exp b/tests/lang/eval-okay-versions.exp index 2015847b6..27ba77dda 100644 --- a/tests/lang/eval-okay-versions.exp +++ b/tests/lang/eval-okay-versions.exp @@ -1 +1 @@ -Bool(True) +true diff --git a/tests/lang/eval-okay-with.exp b/tests/lang/eval-okay-with.exp index 2c9bd8ba0..378c8dc80 100644 --- a/tests/lang/eval-okay-with.exp +++ b/tests/lang/eval-okay-with.exp @@ -1 +1 @@ -Str("xyzzybarxyzzybar",[]) +"xyzzybarxyzzybar"