Bug 1089446 - Improve the comments in both gen_template.pl scripts. r=bz.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 28 Oct 2014 15:04:03 -0700
changeset 212996 134b583fd7abf41496478aa08f63ac8f47ee09ff
parent 212995 693baa2d9ba934201894a20404a6243a566c013e
child 212997 9e670b2869995266dbf1df6dd57d9e2751475e69
push id51111
push usernnethercote@mozilla.com
push dateWed, 29 Oct 2014 21:31:20 +0000
treeherdermozilla-inbound@61c2235ebf16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1089446
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1089446 - Improve the comments in both gen_template.pl scripts. r=bz.
docshell/test/chrome/gen_template.pl
testing/mochitest/gen_template.pl
--- a/docshell/test/chrome/gen_template.pl
+++ b/docshell/test/chrome/gen_template.pl
@@ -1,19 +1,21 @@
 #!/usr/bin/perl
+
+# This script makes docshell test case templates. It takes one argument:
 #
-#  gen_template.pl
-#  Makes docshell test case templates.
-#  Takes one argument:
+#   -b: a bugnumber
 #
-#  -b : a bugnumber
+# For example, this command:
+#
+#   perl gen_template.pl -b 303267
 #
-#  e.g.: perl gen_template.pl -b 303267
-#
-#  Writes test case template files for bug 303267 to the current directory.
+# Writes test case template files test_bug303267.xul and bug303267_window.xul
+# to the current directory.
+
 use FindBin;
 use Getopt::Long;
 GetOptions("b=i"=> \$bug_number);
 
 $template = "$FindBin::RealBin/test.template.txt";
 
 open(IN,$template) or die("Failed to open input file for reading.");
 open(OUT, ">>test_bug" . $bug_number . ".xul") or die("Failed to open output file for appending.");
--- a/testing/mochitest/gen_template.pl
+++ b/testing/mochitest/gen_template.pl
@@ -1,20 +1,25 @@
 #!/usr/bin/perl
+
+# This script makes mochitest test case templates. See
+# https://developer.mozilla.org/en-US/docs/Mochitest#Test_templates
 #
-#  gen_template.pl
-#  Makes test case templates.
-#  Takes two arguments:
+# It takes two arguments:
 #
-#  -b : a bugnumber
-#  -type : template type. {html|xhtml|xul|th|chrome|chromexul}. defaults to html.
+#   -b:     a bugnumber
+#   -type:  template type. One of {html|xhtml|xul|th|chrome|chromexul}.
+#           Defaults to html.
+#
+# For example, this command:
 #
 #  perl gen_template.pl -b 345876 -type xul
 #
-#  sends a test case template for bug 345876 to stdout
+# writes a XUL test case template for bug 345876 to stdout.
+
 use FindBin;
 use Getopt::Long;
 GetOptions("b=i"=> \$bug_number,
            "type:s"=> \$template_type);
 
 if ($template_type eq "xul") {
   $template_type = "$FindBin::RealBin/static/xul.template.txt";
 } elsif ($template_type eq "xhtml") {