[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Tiny changes to the lua5.1-tests.tar.gz suite?
- From: Duck <duck@...>
- Date: Sat, 2 Feb 2008 18:58:32 +1100 (EST)
Will the Benevolent Triumvirate For Life consider making the following
four small changes to 'main.lua' in the lua5.1-test.tar.gz suite?
This is the bit which tests Lua interactively. As discussed a few months
back on the list, Lua compiled with readline support (surely a popular and
useful compile-time option) echos its input lines in the cases below. This
causes the tests to fail.
Changing the stdin redirection from a file to a pipe ("< %" to "cat %s |"
below) file |") removes this anomaly.
In my opinion, these changes do not change the value of the test, and
should therefore be applied.
---cut here---
puctests$ diff -U1 /tmp/main-orig.lua main.lua
--- /tmp/main-orig.lua 2008-02-02 18:40:09.000000000 +1100
+++ main.lua 2008-02-02 18:36:25.000000000 +1100
@@ -97,3 +97,3 @@
= a]]
-RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
+RUN([[cat %s | lua -e"_PROMPT='' _PROMPT2=''" -i > %s]], prog, out)
checkout("6\n10\n10\n\n")
@@ -102,3 +102,3 @@
print(prog)
-RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
+RUN([[cat %s | lua -e"_PROMPT='' _PROMPT2=''" -i > %s]], prog, out)
checkout("b\nc\nd\ne\n\n")
@@ -109,3 +109,3 @@
]]
-RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
+RUN([[cat %s | lua "-e_PROMPT='%s'" -i > %s]], prog, prompt, out)
checkout(string.rep(prompt, 3).."\n")
@@ -128,3 +128,3 @@
prepfile(s)
-RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
+RUN([[cat %s | lua -e"_PROMPT='' _PROMPT2=''" -i > %s]], prog, out)
checkout("11\n1\t2\n\n")
---cut here---