4 # Generates a code stub that adds unit tests to a Check test case.
6 # Supply the test case's source file contents on stdin; the resulting code will
7 # be printed to stdout. This code is designed to be included as part of the
8 # boilerplate at the end of each test case.
14 while (my $line = <>) {
15 # FIXME: this does not correctly handle macro invocations that are split
16 # over multiple lines.
17 if ($line =~ /^HTTPD_START_LOOP_TEST\((\w+),(.*)\)/) {
18 print "tcase_add_loop_test(testcase, $1, 0, ($2));\n";
19 } elsif ($line =~ /^START_TEST\((\w+)\)/) {
20 print "tcase_add_test(testcase, $1);\n"