From b2a0d6b947dff24d83aeaa303f625289a371e566 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 23 Aug 2020 07:38:41 -0700 Subject: [PATCH] add test case for RT #133161, pod2html test --- t/snippets/expect/html2.def | 17 +++++ t/snippets/expect/html2.html | 75 ++++++++++++++++++++ t/snippets/html2.in | 16 +++++ t/snippets/packing_list.txt | 6 +- t/snippets21.t | 133 ++++++++++++++++++++++++++++++++++- 5 files changed, 244 insertions(+), 3 deletions(-) create mode 100644 t/snippets/expect/html2.def create mode 100644 t/snippets/expect/html2.html create mode 100644 t/snippets/html2.in diff --git a/t/snippets/expect/html2.def b/t/snippets/expect/html2.def new file mode 100644 index 00000000..714c1915 --- /dev/null +++ b/t/snippets/expect/html2.def @@ -0,0 +1,17 @@ + +=head1 Units and Measures + +=head2 Oven Temperatures + + Very Slow = 250F / 120C + Slow = 300F / 149C + Moderate = 350F / 177C + Hot = 400F / 204C + Very Hot = 450F / 232C + +=head2 Counting + + 1 dozen = 12 units + 12 dozen = 1 gross = 144 units + 12 gross = 1 great gross = 1728 units + diff --git a/t/snippets/expect/html2.html b/t/snippets/expect/html2.html new file mode 100644 index 00000000..4fc73917 --- /dev/null +++ b/t/snippets/expect/html2.html @@ -0,0 +1,75 @@ + + + + +perltidy + + + + + + + +

perltidy

+ + + + + +

Units and Measures

+ +

Oven Temperatures

+ +
   Very Slow = 250F / 120C
+   Slow = 300F / 149C
+   Moderate = 350F / 177C
+   Hot = 400F / 204C
+   Very Hot = 450F / 232C
+ +

Counting

+ +
   1 dozen = 12 units
+   12 dozen = 1 gross = 144 units
+   12 gross = 1 great gross = 1728 units
+ + +

+
+
+
+
diff --git a/t/snippets/html2.in b/t/snippets/html2.in
new file mode 100644
index 00000000..31cfccc8
--- /dev/null
+++ b/t/snippets/html2.in
@@ -0,0 +1,16 @@
+=head1 Units and Measures
+
+=head2 Oven Temperatures
+
+   Very Slow = 250F / 120C
+   Slow = 300F / 149C
+   Moderate = 350F / 177C
+   Hot = 400F / 204C
+   Very Hot = 450F / 232C
+
+=head2  Counting
+
+   1 dozen = 12 units
+   12 dozen = 1 gross = 144 units
+   12 gross = 1 great gross = 1728 units
+
diff --git a/t/snippets/packing_list.txt b/t/snippets/packing_list.txt
index e29d1f17..1ea2f9cb 100644
--- a/t/snippets/packing_list.txt
+++ b/t/snippets/packing_list.txt
@@ -262,6 +262,8 @@
 ../snippets21.t	gnu7.gnu
 ../snippets21.t	git33.def
 ../snippets21.t	git33.git33
+../snippets21.t	rt133130.def
+../snippets21.t	rt133130.rt133130
 ../snippets3.t	ce_wn1.ce_wn
 ../snippets3.t	ce_wn1.def
 ../snippets3.t	colin.colin
@@ -402,5 +404,5 @@
 ../snippets9.t	rt98902.def
 ../snippets9.t	rt98902.rt98902
 ../snippets9.t	rt99961.def
-../snippets21.t	rt133130.def
-../snippets21.t	rt133130.rt133130
+../snippets21.t	html2.def
+../snippets21.t	html2.html
diff --git a/t/snippets21.t b/t/snippets21.t
index 52e4d78c..9d4e00c4 100644
--- a/t/snippets21.t
+++ b/t/snippets21.t
@@ -14,6 +14,8 @@
 #11 git33.git33
 #12 rt133130.def
 #13 rt133130.rt133130
+#14 html2.def
+#15 html2.html
 
 # To locate test #13 you can search for its name or the string '#13'
 
@@ -36,7 +38,11 @@ BEGIN {
 -wls='->' -wrs='->'
 
 ----------
-        'gnu'      => "-gnu",
+        'gnu'  => "-gnu",
+        'html' => <<'----------',
+-fmt="html"
+-nts
+----------
         'lop'      => "-nlop",
         'rt133130' => <<'----------',
 # only the method should get a csc:
@@ -85,6 +91,25 @@ else {                    # We're the third word to have this
     # abbreviation, so skip to the next word.
     next WORD;
 }
+----------
+
+        'html2' => <<'----------',
+=head1 Units and Measures
+
+=head2 Oven Temperatures
+
+   Very Slow = 250F / 120C
+   Slow = 300F / 149C
+   Moderate = 350F / 177C
+   Hot = 400F / 204C
+   Very Hot = 450F / 232C
+
+=head2  Counting
+
+   1 dozen = 12 units
+   12 dozen = 1 gross = 144 units
+   12 gross = 1 great gross = 1728 units
+
 ----------
 
         'lop' => <<'----------',
@@ -559,6 +584,112 @@ method sum_radlinks {
 } ## end sub sum_radlinks
 #13...........
         },
+
+        'html2.def' => {
+            source => "html2",
+            params => "def",
+            expect => <<'#14...........',
+
+=head1 Units and Measures
+
+=head2 Oven Temperatures
+
+   Very Slow = 250F / 120C
+   Slow = 300F / 149C
+   Moderate = 350F / 177C
+   Hot = 400F / 204C
+   Very Hot = 450F / 232C
+
+=head2  Counting
+
+   1 dozen = 12 units
+   12 dozen = 1 gross = 144 units
+   12 gross = 1 great gross = 1728 units
+
+#14...........
+        },
+
+        'html2.html' => {
+            source => "html2",
+            params => "html",
+            expect => <<'#15...........',
+
+
+
+
+perltidy
+
+
+
+
+
+
+
+

perltidy

+ + + + + +

Units and Measures

+ +

Oven Temperatures

+ +
   Very Slow = 250F / 120C
+   Slow = 300F / 149C
+   Moderate = 350F / 177C
+   Hot = 400F / 204C
+   Very Hot = 450F / 232C
+ +

Counting

+ +
   1 dozen = 12 units
+   12 dozen = 1 gross = 144 units
+   12 gross = 1 great gross = 1728 units
+ + +

+
+
+
+
+#15...........
+        },
     };
 
     my $ntests = 0 + keys %{$rtests};
-- 
2.39.5