Loading Makefile.in +4 −1 Original line number Diff line number Diff line Loading @@ -456,8 +456,11 @@ $(testcase_STUBS): %.tests: %.c test/httpdunit.cases: $(testcase_SOURCES) | unittest-objdir for t in $^; do \ $(top_srcdir)/build/httpdunit_gen_cases.pl < "$$t"; \ $(top_srcdir)/build/httpdunit_gen_cases.pl --declaration < "$$t"; \ done > $@ for t in $^; do \ $(top_srcdir)/build/httpdunit_gen_cases.pl < "$$t"; \ done >> $@ test/httpdunit.lo: test/httpdunit.c test/httpdunit.cases | unittest-objdir Loading build/httpdunit_gen_cases.pl +13 −2 Original line number Diff line number Diff line Loading @@ -14,10 +14,21 @@ use strict; use warnings; use Getopt::Long; my $print_declaration = 0; GetOptions("declaration" => \$print_declaration) or die("unknown option"); while (my $line = <>) { if ($line =~ /^HTTPD_BEGIN_TEST_CASE(?:\w+)?\((\w+)/) { my $name = "$1_test_case"; print "TCase *$name(void); "; if ($print_declaration) { print "TCase *$name(void);\n"; } else { print "suite_add_tcase(suite, $name());\n"; } } } Loading
Makefile.in +4 −1 Original line number Diff line number Diff line Loading @@ -456,8 +456,11 @@ $(testcase_STUBS): %.tests: %.c test/httpdunit.cases: $(testcase_SOURCES) | unittest-objdir for t in $^; do \ $(top_srcdir)/build/httpdunit_gen_cases.pl < "$$t"; \ $(top_srcdir)/build/httpdunit_gen_cases.pl --declaration < "$$t"; \ done > $@ for t in $^; do \ $(top_srcdir)/build/httpdunit_gen_cases.pl < "$$t"; \ done >> $@ test/httpdunit.lo: test/httpdunit.c test/httpdunit.cases | unittest-objdir Loading
build/httpdunit_gen_cases.pl +13 −2 Original line number Diff line number Diff line Loading @@ -14,10 +14,21 @@ use strict; use warnings; use Getopt::Long; my $print_declaration = 0; GetOptions("declaration" => \$print_declaration) or die("unknown option"); while (my $line = <>) { if ($line =~ /^HTTPD_BEGIN_TEST_CASE(?:\w+)?\((\w+)/) { my $name = "$1_test_case"; print "TCase *$name(void); "; if ($print_declaration) { print "TCase *$name(void);\n"; } else { print "suite_add_tcase(suite, $name());\n"; } } }