4 # Makes test case templates.
8 # -type : template type. {html|xhtml|xul}. defaults to html.
10 # perl gen_template.pl -b 345876 -type xul
12 # sends a test case template for bug 345876 to stdout
15 GetOptions
("b=i"=> \
$bug_number,
16 "type:s"=> \
$template_type);
18 if ($template_type eq "xul") {
19 $template_type = "$FindBin::RealBin/static/xul.template.txt";
20 } elsif ($template_type eq "xhtml") {
21 $template_type = "$FindBin::RealBin/static/xhtml.template.txt";
23 $template_type = "$FindBin::RealBin/static/test.template.txt";
26 open(IN
,$template_type) or die("Failed to open myfile for reading.");
27 while((defined(IN
)) && ($line = <IN
>)) {
28 $line =~ s/{BUGNUMBER}/$bug_number/g;