[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: test suite for Lua 5.2 alpha
- From: Leo Razoumov <slonik.az@...>
- Date: Fri, 7 Jan 2011 09:25:26 -0500
On Thu, Jan 6, 2011 at 22:22, Henning Diedrich <hd2010@eonblast.com> wrote:
> Hi Leo,
>
> On 1/7/11 2:38 AM, Leo Razoumov wrote:
>> On Thu, Jan 6, 2011 at 17:21, Henning Diedrich <hd2010@eonblast.com>
>> wrote:
>>> Could this be wrong in main (or is this the test itself)? main.lua
>>> 151: RUN([[lua "-e_PROMPT='%s'" -i < %s > %s]], prompt, prog, out)
>>> (? : RUN([[lua -e"_PROMPT='%s'" -i < %s > %s]], prompt, prog,
>>> out)) It fails for me.
>>
>> Is your lua built with readline library?
>
> Yes (and the test libs not).
>
> If that makes a difference, the tests right before that one work and I
> wondered about
>
> main.lua 151: ... "-e_PROMPT='%s'" ...
>
> which in the lines above is
>
> ... -e"_PROMPT='%s'" ...
>
> with the first quote 3 places further right.
>
> Just a wild guess, I will look at the readline flag.
>
> Thanks,
> Henning
>
>
To pass these tests on Lua-5.1.4 I use a modified version of the patch
proposed by Duck in
http://lua-users.org/lists/lua-l/2008-02/msg00095.html
Attached is my modified patch against the code in
http://www.inf.puc-rio.br/~roberto/lua/lua5.1-tests.tar.gz
Hope it helps.
--Leo--
diff --git a/lua5.1-tests/main.lua b/lua5.1-tests/main.lua
index 22b4f74..9e1c8da 100644
--- a/lua5.1-tests/main.lua
+++ b/lua5.1-tests/main.lua
@@ -34,7 +34,7 @@ end
function auxrun (...)
local s = string.format(...)
- s = string.gsub(s, "lua", progname, 1)
+ s = string.gsub(s, "lua ", progname..' ', 1)
return os.execute(s)
end
@@ -95,19 +95,19 @@ a
= 10
print(a)
= 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")
prepfile("a = [[b\nc\nd\ne]]\n=a")
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")
prompt = "alo"
prepfile[[ --
a = 2
]]
-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")
s = [=[ --
@@ -126,7 +126,7 @@ assert( a == b )
=f( 11 ) ]=]
s = string.gsub(s, ' ', '\n\n')
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")
prepfile[[#comment in 1st line without \n at the end]]