Add a test for #22.
This commit is contained in:
parent
67e7d226ad
commit
1039c0a747
26
tests/plat/bugs/bug-22-inn_mod.mod
Normal file
26
tests/plat/bugs/bug-22-inn_mod.mod
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
MODULE test;
|
||||||
|
FROM InOut IMPORT WriteLn, WriteString;
|
||||||
|
|
||||||
|
TYPE charset = SET OF CHAR;
|
||||||
|
|
||||||
|
PROCEDURE Space(c: CHAR): BOOLEAN;
|
||||||
|
BEGIN
|
||||||
|
RETURN c IN charset{' ', 11C, 12C, 15C}
|
||||||
|
END Space;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
IF Space('a') THEN
|
||||||
|
WriteString("@@FAIL 1");
|
||||||
|
WriteLn;
|
||||||
|
END;
|
||||||
|
IF NOT Space(' ') THEN
|
||||||
|
WriteString("@@FAIL 2");
|
||||||
|
WriteLn;
|
||||||
|
END;
|
||||||
|
IF NOT Space(12C) THEN
|
||||||
|
WriteString("@@FAIL 3");
|
||||||
|
WriteLn;
|
||||||
|
END;
|
||||||
|
WriteString("@@FINISHED");
|
||||||
|
WriteLn;
|
||||||
|
END test.
|
|
@ -11,7 +11,8 @@ definerule("plat_testsuite",
|
||||||
local testfiles = filenamesof(
|
local testfiles = filenamesof(
|
||||||
"tests/plat/*.c",
|
"tests/plat/*.c",
|
||||||
"tests/plat/*.e",
|
"tests/plat/*.e",
|
||||||
"tests/plat/*.p"
|
"tests/plat/*.p",
|
||||||
|
"tests/plat/bugs/*.mod"
|
||||||
)
|
)
|
||||||
|
|
||||||
acklibrary {
|
acklibrary {
|
||||||
|
@ -23,8 +24,8 @@ definerule("plat_testsuite",
|
||||||
|
|
||||||
local tests = {}
|
local tests = {}
|
||||||
for _, f in ipairs(testfiles) do
|
for _, f in ipairs(testfiles) do
|
||||||
local fs = replace(basename(f), "%..$", "")
|
local fs = replace(basename(f), "%.[^.]+$", "")
|
||||||
local _, _, lang = fs:find("_(.)$")
|
local _, _, lang = fs:find("_([^_]+)$")
|
||||||
if not lang then
|
if not lang then
|
||||||
lang = "e"
|
lang = "e"
|
||||||
end
|
end
|
||||||
|
@ -49,7 +50,7 @@ definerule("plat_testsuite",
|
||||||
"util/build+testrunner"
|
"util/build+testrunner"
|
||||||
},
|
},
|
||||||
commands = {
|
commands = {
|
||||||
"(%{ins[2]} "..e.method.." %{ins[1]} 5 %{ins[3]} || echo FAILED) 2>&1 > %{outs}",
|
"(%{ins[2]} "..e.method.." %{ins[1]} 5 %{ins[3]} || echo FAILED) > %{outs}",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue