groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/04: Add smoke test for HTML output.


From: G. Branden Robinson
Subject: [groff] 03/04: Add smoke test for HTML output.
Date: Sun, 12 Apr 2020 12:22:16 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 4adc25dd21563e9bfe179c4185df3fb9a4995df3
Author: G. Branden Robinson <address@hidden>
AuthorDate: Sun Apr 12 23:59:34 2020 +1000

    Add smoke test for HTML output.
    
    * src/roff/groff/tests/smoke-test_html_device.sh:
    * src/roff/groff/groff.am: Add regression test.
---
 ChangeLog                                      |  5 ++++
 src/roff/groff/groff.am                        |  1 +
 src/roff/groff/tests/smoke-test_html_device.sh | 36 ++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 98ae960..5999fe8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-13  G. Branden Robinson <address@hidden>
+
+       * src/roff/groff/tests/smoke-test_html_device.sh:
+       * src/roff/groff/groff.am: Add regression test.
+
 2020-04-12  G. Branden Robinson <address@hidden>
 
        * src/roff/groff/tests/regression_savannah_58153.sh:
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index ca1f4ad..a7999dc 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -45,6 +45,7 @@ groff_TESTS = \
   src/roff/groff/tests/recognize_end_of_sentence.sh \
   src/roff/groff/tests/regression_savannah_56555.sh \
   src/roff/groff/tests/regression_savannah_58153.sh \
+  src/roff/groff/tests/smoke-test_html_device.sh \
   src/roff/groff/tests/string_case_xform_errors.sh \
   src/roff/groff/tests/string_case_xform_requests.sh \
   src/roff/groff/tests/string_case_xform_unicode_escape.sh \
diff --git a/src/roff/groff/tests/smoke-test_html_device.sh 
b/src/roff/groff/tests/smoke-test_html_device.sh
new file mode 100755
index 0000000..2902666
--- /dev/null
+++ b/src/roff/groff/tests/smoke-test_html_device.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+set -e
+
+# Check two forms of character transformation.
+#
+# dash's built-in printf doesn't support \x or \u escapes, so likely
+# other shells don't either, and expecting one that does to be in the
+# $PATH seems optimistic.  So use UTF-8 octal bytes directly.
+echo "testing -k -Thtml" >&2
+printf '\303\241' | "$groff" -k -Thtml | grep -qx '<p>&aacute;</p>'
+
+# We test compatibility-mode HTML output somewhat differently since
+# preconv only emits groffish \[uXXXX] escapes for non-ASCII codepoints.
+echo "testing -C -k -Thtml" >&2
+printf "\('a" | "$groff" -C -k -Thtml | grep -qx '<p>&aacute;</p>'



reply via email to

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