diff --git a/tests/plat/_dummy.c b/tests/plat/_dummy_e.c similarity index 100% rename from tests/plat/_dummy.c rename to tests/plat/_dummy_e.c diff --git a/tests/plat/bugs/bug-22-inn_mod.mod b/tests/plat/bugs/bug-22-inn_mod.mod new file mode 100644 index 000000000..8f3a2d00a --- /dev/null +++ b/tests/plat/bugs/bug-22-inn_mod.mod @@ -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. \ No newline at end of file diff --git a/tests/plat/build.lua b/tests/plat/build.lua index f5885a190..d8362b3a0 100644 --- a/tests/plat/build.lua +++ b/tests/plat/build.lua @@ -11,7 +11,8 @@ definerule("plat_testsuite", local testfiles = filenamesof( "tests/plat/*.c", "tests/plat/*.e", - "tests/plat/*.p" + "tests/plat/*.p", + "tests/plat/bugs/*.mod" ) acklibrary { @@ -23,8 +24,8 @@ definerule("plat_testsuite", local tests = {} for _, f in ipairs(testfiles) do - local fs = replace(basename(f), "%..$", "") - local _, _, lang = fs:find("_(.)$") + local fs = replace(basename(f), "%.[^.]+$", "") + local _, _, lang = fs:find("_([^_]+)$") if not lang then lang = "e" end @@ -49,7 +50,7 @@ definerule("plat_testsuite", "util/build+testrunner" }, 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