Skip to content
Snippets Groups Projects
Commit 8e781ab9 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

testsuite has dependencies on preprepared module_testsuite.in (cp to module_testsuite)

Rev: src/modules/Image/mktests.pike:1.3
Rev: src/modules/Image/testsuite.in.in:1.6
Rev: src/modules/Makefile.in:1.21
parent 20e2106d
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ array chapters=({});
array tests=({});
int mode=0;
int n=0;
void finish_test()
{
......@@ -33,11 +34,25 @@ void finish_test()
"}\n\n");
break;
case 1:
test=cpp("#define ok(S) return \"ok\"\n"
"#define fail(S) return (S)\n"+
replace(test,"ok()","ok(\"ok\")"));
test=replace(cpp("#define ok(S) return \"ok\"\n"
"#define fail(S) return (S)\n"+
replace(test,({"#","ok()"}),({"","ok(\"ok\")"})),
),"","#");
write("test_any([["+test+"]], \"ok\")\n");
break;
case 2:
test=replace(cpp("#define ok(S) return 1\n"
"#define fail(S) do { werror(\"failure; "+module+"/"+chapter+"/"+name+": \"+(S)+\"\\n\"); return 0; } while (0)\n"+
replace(test,({"#","ok()"}),({"","ok(\"ok\")"})),
),"","#");
write("test "+(++n)+", expected result: EQ\n"
"mixed a()"
"{\n"+
test+
"}\n"
"mixed b() { return 1; }\n"
"\n....\n");
break;
}
name=0;
}
......@@ -112,7 +127,7 @@ int main(int ac,array am)
{
int n;
if (ac>=2 && am[1]=="-t") mode=1,am=am[..0]+am[2..];
if (ac>=2 && am[1]=="-t") mode=2,am=am[..0]+am[2..];
if (ac<2)
{
......
#module Image.image
{
//-----------------------------------------------------------------------
#chapter testuite
#chapter testsuite
#test Image.PNM.decode, ==
object img1=Image.PNM.decode("P1\n5 5\n0 1 1 1 1\n1 0 1 1 1\n1 1 0 1 1\n1 1 1 0 1\n1 1 1 1 0");
......@@ -91,7 +91,7 @@
ok();
//-----------------------------------------------------------------------
#chapter testuite III
#chapter testsuite III
#test equal, copy_value
array a=({0,0,0});
......
# $Id: Makefile.in,v 1.20 1998/04/26 11:45:58 hubbe Exp $
# $Id: Makefile.in,v 1.21 1998/04/29 20:55:04 mirar Exp $
@SET_MAKE@
......@@ -54,8 +54,11 @@ verify:
verbose_verify:
for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) MODNAME=$$a verbose_verify ) || exit $$? ; done
fdtestsuites:
for a in $(MODULES) ; do echo $$a ; $(TMP_BINDIR)/mktestsuite $(SRCDIR)/$$a/testsuite.in >$$a/module_testsuite -DSRCDIR=$(SRCDIR)/$$a || exit $$? ; done
testsuites:
for a in $(MODULES) ; do echo $$a ; $(TMP_BINDIR)/mktestsuite $(SRCDIR)/$$a/testsuite.in >$$a/module_testsuite -DSRCDIR=$(SRCDIR)/$$a || exit $$? ; done
for a in $(MODULES) ; do (cd $$a; make module_testsuite) ; done
extra_tests:
for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) MODNAME=$$a extra_tests ) || exit $$? ; done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment