3 # This script makes docshell test case templates. It takes one argument:
7 # For example, this command:
9 # perl gen_template.pl -b 303267
11 # Writes test case template files test_bug303267.xhtml and bug303267_window.xhtml
12 # to the current directory.
16 GetOptions
("b=i"=> \
$bug_number);
18 $template = "$FindBin::RealBin/test.template.txt";
20 open(IN
,$template) or die("Failed to open input file for reading.");
21 open(OUT
, ">>test_bug" . $bug_number . ".xhtml") or die("Failed to open output file for appending.");
22 while((defined(IN
)) && ($line = <IN
>)) {
23 $line =~ s/{BUGNUMBER}/$bug_number/g;
29 $template = "$FindBin::RealBin/window.template.txt";
31 open(IN
,$template) or die("Failed to open input file for reading.");
32 open(OUT
, ">>bug" . $bug_number . "_window.xhtml") or die("Failed to open output file for appending.");
33 while((defined(IN
)) && ($line = <IN
>)) {
34 $line =~ s/{BUGNUMBER}/$bug_number/g;