This gets around strict compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpdunit@
1796203 13f79535-47bb-0310-9956-
ffa450edef68
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
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); ";
- print "suite_add_tcase(suite, $name());\n";
+
+ if ($print_declaration) {
+ print "TCase *$name(void);\n";
+ } else {
+ print "suite_add_tcase(suite, $name());\n";
+ }
}
}