# This script makes docshell test case templates. It takes one argument: # # -b: a bugnumber # # For example, this command: # # perl gen_template.pl -b 303267 # # Writes test case template files test_bug303267.xhtml and bug303267_window.xhtml # to the current directory.
use FindBin;
use Getopt::Long;
GetOptions("b=i"=> \$bug_number);
open(IN,$template) or die("Failed to open input file for reading.");
open(OUT, ">>test_bug" . $bug_number . ".xhtml") or die("Failed to open output file for appending."); while((defined(IN)) && ($line = <IN>)) {
$line =~ s/{BUGNUMBER}/$bug_number/g;
print OUT $line;
}
close(IN);
close(OUT);
open(IN,$template) or die("Failed to open input file for reading.");
open(OUT, ">>bug" . $bug_number . "_window.xhtml") or die("Failed to open output file for appending."); while((defined(IN)) && ($line = <IN>)) {
$line =~ s/{BUGNUMBER}/$bug_number/g;
print OUT $line;
}
close(IN);
close(OUT);
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.