texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: More tests for highlight_syntax.pm


From: Patrice Dumas
Subject: branch master updated: More tests for highlight_syntax.pm
Date: Sat, 13 Aug 2022 04:30:55 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new a26c24a497 More tests for highlight_syntax.pm
a26c24a497 is described below

commit a26c24a497923a3b64b6b078585c08de529c249c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 13 10:30:21 2022 +0200

    More tests for highlight_syntax.pm
---
 tp/tests/other/highlight_example.texi              |  3 +--
 tp/tests/other/list-of-tests                       |  2 ++
 .../highlight_syntax_example/chapter.html          |  2 +-
 .../highlight_example_highlight_perl_input.pl      |  2 +-
 .../highlight_example_highlight_perl_output.html   |  2 +-
 .../highlight_syntax_example/index.html            |  1 -
 .../chapter.html                                   | 10 ++++-----
 .../highlight_example.1                            |  0
 .../highlight_example.2                            |  0
 .../highlight_example_highlight_C_input.C          | 12 +++++++++++
 .../highlight_example_highlight_C_output.html      | 15 +++++++++++++
 .../highlight_example_highlight_perl_input.pl      |  2 +-
 .../highlight_example_highlight_perl_output.html   |  2 +-
 .../highlight_example_highlight_texinfo_input.texi |  6 ++++++
 ...highlight_example_highlight_texinfo_output.html |  9 ++++++++
 .../index.html                                     |  9 ++++----
 .../other_highlight_syntax_example_latin9.sh       | 25 ++++++++++++++++++++++
 17 files changed, 84 insertions(+), 18 deletions(-)

diff --git a/tp/tests/other/highlight_example.texi 
b/tp/tests/other/highlight_example.texi
index 681a225407..970438a023 100644
--- a/tp/tests/other/highlight_example.texi
+++ b/tp/tests/other/highlight_example.texi
@@ -1,5 +1,4 @@
 \input texinfo @c -*-texinfo-*-
-@setfilename highlight_example.info
 
 @node Top
 @top top
@@ -27,7 +26,7 @@ int main() @{
 
 perl
 @example perl
-my $list = ['ça', 'bôù'];
+my $list = ['ça', 'bôù', 'é', '@'e @ogonek{a} @euro{} @equiv{}'];
 sub do ($) @{
   my $arg = shift;
   return $arg + 4;
diff --git a/tp/tests/other/list-of-tests b/tp/tests/other/list-of-tests
index b3a23008f1..7ca928d284 100644
--- a/tp/tests/other/list-of-tests
+++ b/tp/tests/other/list-of-tests
@@ -1,3 +1,5 @@
 # formats :_html
 
 highlight_syntax_example highlight_example.texi --html 
--init=highlight_syntax.pm
+
+highlight_syntax_example_latin9 highlight_example.texi --html 
--init=highlight_syntax.pm -c 'OUTPUT_ENCODING_NAME=ISO-8859-15'
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html 
b/tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html
index 7117d281a3..fb0818f28a 100644
--- a/tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html
+++ b/tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html
@@ -53,7 +53,7 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a>, Up: <a href="in
 
 <p>perl
 </p><div class="example perl">
-<pre class="example-preformatted"><b><span style="color:#0000FF">my</span></b> 
<span style="color:#009900">$list</span> <span style="color:#990000">=</span> 
<span style="color:#990000">[</span><span 
style="color:#FF0000">'ça'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'bôù'</span><span style="color:#990000">];</span>
+<pre class="example-preformatted"><b><span style="color:#0000FF">my</span></b> 
<span style="color:#009900">$list</span> <span style="color:#990000">=</span> 
<span style="color:#990000">[</span><span 
style="color:#FF0000">'ça'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'bôù'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'é'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'é ą € ≡'</span><span style="color:#990000" [...]
 <b><span style="color:#0000FF">sub</span></b> <b><span 
style="color:#0000FF">do</span></b> <span style="color:#990000">(</span>$<span 
style="color:#990000">)</span> <span style="color:#FF0000">{</span>
   <b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">=</span> <b><span 
style="color:#0000FF">shift</span></b><span style="color:#990000">;</span>
   <b><span style="color:#0000FF">return</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">+</span> <span 
style="color:#993399">4</span><span style="color:#990000">;</span>
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
 
b/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
index ed403c7929..0620bafb0d 100644
--- 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
@@ -1,7 +1,7 @@
 Automatically generated
 
 _______________________ 0
-my $list = ['ça', 'bôù'];
+my $list = ['ça', 'bôù', 'é', 'é ą € ≡'];
 sub do ($) {
   my $arg = shift;
   return $arg + 4;
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
 
b/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
index 1fb223ae85..db61f90348 100644
--- 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
@@ -3,7 +3,7 @@ by Lorenzo Bettini
 http://www.lorenzobettini.it
 http://www.gnu.org/software/src-highlite -->
 <pre>_______________________________________ highlight texinfo _GT Haib0aik 
zei4YieH
-<b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$list</span> <span style="color:#990000">=</span> <span 
style="color:#990000">[</span><span style="color:#FF0000">'ça'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'bôù'</span><span 
style="color:#990000">];</span>
+<b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$list</span> <span style="color:#990000">=</span> <span 
style="color:#990000">[</span><span style="color:#FF0000">'ça'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'bôù'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'é'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'é ą € 
≡'</span><span style="color:#990000">];</span>
 <b><span style="color:#0000FF">sub</span></b> <b><span 
style="color:#0000FF">do</span></b> <span style="color:#990000">(</span>$<span 
style="color:#990000">)</span> <span style="color:#FF0000">{</span>
   <b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">=</span> <b><span 
style="color:#0000FF">shift</span></b><span style="color:#990000">;</span>
   <b><span style="color:#0000FF">return</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">+</span> <span 
style="color:#993399">4</span><span style="color:#990000">;</span>
diff --git a/tp/tests/other/res_parser_html/highlight_syntax_example/index.html 
b/tp/tests/other/res_parser_html/highlight_syntax_example/index.html
index ca4e35fdb0..63a1aac417 100644
--- a/tp/tests/other/res_parser_html/highlight_syntax_example/index.html
+++ b/tp/tests/other/res_parser_html/highlight_syntax_example/index.html
@@ -19,7 +19,6 @@
 </head>
 
 <body lang="en">
-
 <div class="top-level-extent" id="Top">
 <div class="nav-panel">
 <p>
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/chapter.html
similarity index 83%
copy from tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html
copy to 
tp/tests/other/res_parser_html/highlight_syntax_example_latin9/chapter.html
index 7117d281a3..07774bc34a 100644
--- a/tp/tests/other/res_parser_html/highlight_syntax_example/chapter.html
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/chapter.html
@@ -2,7 +2,7 @@
 <html>
 <!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
 <title>chapter (top)</title>
 
 <meta name="description" content="chapter (top)">
@@ -31,12 +31,12 @@ div.example {margin-left: 3.2em}
 Previous: <a href="index.html" accesskey="p" rel="prev">top</a>, Up: <a 
href="index.html" accesskey="u" rel="up">top</a> &nbsp; </p>
 </div>
 <hr>
-<h2 class="chapter" id="chap">1 châp</h2>
+<h2 class="chapter" id="chap">1 ch�p</h2>
 
 <p>Texinfo
 </p><div class="example texinfo">
 <pre class="example-preformatted">texinfo
-<i><span style="color:#9A1900">@code{protécted}</span></i>
+<i><span style="color:#9A1900">@code{prot�cted}</span></i>
 </pre></div>
 
 <p>C++
@@ -46,14 +46,14 @@ Previous: <a href="index.html" accesskey="p" 
rel="prev">top</a>, Up: <a href="in
 <b><span style="color:#000080">#include</span></b> <span 
style="color:#FF0000">&lt;iostream&gt;</span>
 
 <span style="color:#009900">int</span> <b><span 
style="color:#000000">main</span></b><span style="color:#990000">()</span> 
<span style="color:#FF0000">{</span>
-    std<span style="color:#990000">::</span>cout <span 
style="color:#990000">&lt;&lt;</span> <span style="color:#FF0000">"Hello 
Wörld!"</span><span style="color:#990000">;</span>
+    std<span style="color:#990000">::</span>cout <span 
style="color:#990000">&lt;&lt;</span> <span style="color:#FF0000">"Hello 
W�rld!"</span><span style="color:#990000">;</span>
     <b><span style="color:#0000FF">return</span></b> <span 
style="color:#993399">0</span><span style="color:#990000">;</span>
 <span style="color:#FF0000">}</span>
 </pre></div>
 
 <p>perl
 </p><div class="example perl">
-<pre class="example-preformatted"><b><span style="color:#0000FF">my</span></b> 
<span style="color:#009900">$list</span> <span style="color:#990000">=</span> 
<span style="color:#990000">[</span><span 
style="color:#FF0000">'ça'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'bôù'</span><span style="color:#990000">];</span>
+<pre class="example-preformatted"><b><span style="color:#0000FF">my</span></b> 
<span style="color:#009900">$list</span> <span style="color:#990000">=</span> 
<span style="color:#990000">[</span><span 
style="color:#FF0000">'�a'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'b��'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'�'</span><span style="color:#990000">,</span> <span 
style="color:#FF0000">'� a; � =='</span><span style="color:#99000 [...]
 <b><span style="color:#0000FF">sub</span></b> <b><span 
style="color:#0000FF">do</span></b> <span style="color:#990000">(</span>$<span 
style="color:#990000">)</span> <span style="color:#FF0000">{</span>
   <b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">=</span> <b><span 
style="color:#0000FF">shift</span></b><span style="color:#990000">;</span>
   <b><span style="color:#0000FF">return</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">+</span> <span 
style="color:#993399">4</span><span style="color:#990000">;</span>
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example.1
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example.1
new file mode 100644
index 0000000000..e69de29bb2
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example.2
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example.2
new file mode 100644
index 0000000000..e69de29bb2
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_C_input.C
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_C_input.C
new file mode 100644
index 0000000000..87a48a1e74
--- /dev/null
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_C_input.C
@@ -0,0 +1,12 @@
+Automatically generated
+
+_______________________ 0
+// Your First C++ Program
+
+#include <iostream>
+
+int main() {
+    std::cout << "Hello W�rld!";
+    return 0;
+}
+_______________________ 0
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_C_output.html
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_C_output.html
new file mode 100644
index 0000000000..b0ccc1f655
--- /dev/null
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_C_output.html
@@ -0,0 +1,15 @@
+<!-- Generator: GNU source-highlight 
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>_______________________________________ highlight texinfo _GT Haib0aik 
zei4YieH
+<i><span style="color:#9A1900">// Your First C++ Program</span></i>
+
+<b><span style="color:#000080">#include</span></b> <span 
style="color:#FF0000">&lt;iostream&gt;</span>
+
+<span style="color:#009900">int</span> <b><span 
style="color:#000000">main</span></b><span style="color:#990000">()</span> 
<span style="color:#FF0000">{</span>
+    std<span style="color:#990000">::</span>cout <span 
style="color:#990000">&lt;&lt;</span> <span style="color:#FF0000">"Hello 
W�rld!"</span><span style="color:#990000">;</span>
+    <b><span style="color:#0000FF">return</span></b> <span 
style="color:#993399">0</span><span style="color:#990000">;</span>
+<span style="color:#FF0000">}</span>
+_______________________________________ highlight texinfo _GT Haib0aik zei4YieH
+</pre>
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_perl_input.pl
similarity index 74%
copy from 
tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
copy to 
tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_perl_input.pl
index ed403c7929..4a2e4aac36 100644
--- 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_input.pl
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_perl_input.pl
@@ -1,7 +1,7 @@
 Automatically generated
 
 _______________________ 0
-my $list = ['ça', 'bôù'];
+my $list = ['�a', 'b��', '�', '� a; � =='];
 sub do ($) {
   my $arg = shift;
   return $arg + 4;
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_perl_output.html
similarity index 75%
copy from 
tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
copy to 
tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_perl_output.html
index 1fb223ae85..fb541100fb 100644
--- 
a/tp/tests/other/res_parser_html/highlight_syntax_example/highlight_example_highlight_perl_output.html
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_perl_output.html
@@ -3,7 +3,7 @@ by Lorenzo Bettini
 http://www.lorenzobettini.it
 http://www.gnu.org/software/src-highlite -->
 <pre>_______________________________________ highlight texinfo _GT Haib0aik 
zei4YieH
-<b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$list</span> <span style="color:#990000">=</span> <span 
style="color:#990000">[</span><span style="color:#FF0000">'ça'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'bôù'</span><span 
style="color:#990000">];</span>
+<b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$list</span> <span style="color:#990000">=</span> <span 
style="color:#990000">[</span><span style="color:#FF0000">'�a'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'b��'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'�'</span><span 
style="color:#990000">,</span> <span style="color:#FF0000">'� a; � 
=='</span><span style="color:#990000">];</span>
 <b><span style="color:#0000FF">sub</span></b> <b><span 
style="color:#0000FF">do</span></b> <span style="color:#990000">(</span>$<span 
style="color:#990000">)</span> <span style="color:#FF0000">{</span>
   <b><span style="color:#0000FF">my</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">=</span> <b><span 
style="color:#0000FF">shift</span></b><span style="color:#990000">;</span>
   <b><span style="color:#0000FF">return</span></b> <span 
style="color:#009900">$arg</span> <span style="color:#990000">+</span> <span 
style="color:#993399">4</span><span style="color:#990000">;</span>
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_texinfo_input.texi
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_texinfo_input.texi
new file mode 100644
index 0000000000..80b6d6f8ce
--- /dev/null
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_texinfo_input.texi
@@ -0,0 +1,6 @@
+Automatically generated
+
+_______________________ 0
+texinfo
+@code{prot�cted}
+_______________________ 0
diff --git 
a/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_texinfo_output.html
 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_texinfo_output.html
new file mode 100644
index 0000000000..de6c15a40b
--- /dev/null
+++ 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/highlight_example_highlight_texinfo_output.html
@@ -0,0 +1,9 @@
+<!-- Generator: GNU source-highlight 
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>_______________________________________ highlight texinfo _GT Haib0aik 
zei4YieH
+texinfo
+<i><span style="color:#9A1900">@code{prot�cted}</span></i>
+_______________________________________ highlight texinfo _GT Haib0aik zei4YieH
+</pre>
diff --git a/tp/tests/other/res_parser_html/highlight_syntax_example/index.html 
b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/index.html
similarity index 72%
copy from tp/tests/other/res_parser_html/highlight_syntax_example/index.html
copy to 
tp/tests/other/res_parser_html/highlight_syntax_example_latin9/index.html
index ca4e35fdb0..c0d89910c9 100644
--- a/tp/tests/other/res_parser_html/highlight_syntax_example/index.html
+++ b/tp/tests/other/res_parser_html/highlight_syntax_example_latin9/index.html
@@ -2,7 +2,7 @@
 <html>
 <!-- Created by texinfo, http://www.gnu.org/software/texinfo/ -->
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
 <title>Top (top)</title>
 
 <meta name="description" content="Top (top)">
@@ -19,23 +19,22 @@
 </head>
 
 <body lang="en">
-
 <div class="top-level-extent" id="Top">
 <div class="nav-panel">
 <p>
-Next: <a href="chapter.html" accesskey="n" rel="next">châp</a> &nbsp; </p>
+Next: <a href="chapter.html" accesskey="n" rel="next">ch�p</a> &nbsp; </p>
 </div>
 <hr>
 <h1 class="top" id="top">top</h1>
 
 <ul class="mini-toc">
-<li><a href="chapter.html" accesskey="1">châp</a></li>
+<li><a href="chapter.html" accesskey="1">ch�p</a></li>
 </ul>
 </div>
 <hr>
 <div class="nav-panel">
 <p>
-Next: <a href="chapter.html" accesskey="n" rel="next">châp</a> &nbsp; </p>
+Next: <a href="chapter.html" accesskey="n" rel="next">ch�p</a> &nbsp; </p>
 </div>
 
 
diff --git a/tp/tests/test_scripts/other_highlight_syntax_example_latin9.sh 
b/tp/tests/test_scripts/other_highlight_syntax_example_latin9.sh
new file mode 100755
index 0000000000..a47d3140a1
--- /dev/null
+++ b/tp/tests/test_scripts/other_highlight_syntax_example_latin9.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+# This file generated by maintain/regenerate_cmd_tests.sh
+
+if test z"$srcdir" = "z"; then
+  srcdir=.
+fi
+
+one_test_logs_dir=test_log
+
+
+
+if test "z$OTHER_TESTS" != z"yes"; then
+  echo "Skipping other tests that are not easily reproducible"
+  exit 77
+fi
+
+dir=other
+name='highlight_syntax_example_latin9'
+mkdir -p $dir
+
+"$srcdir"/run_parser_all.sh -dir $dir $name
+exit_status=$?
+cat $dir/$one_test_logs_dir/$name.log
+exit $exit_status
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]