groff-commit
[Top][All Lists]
Advanced

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

[groff] 05/13: [groff]: Regression-test Savannah #58962.


From: G. Branden Robinson
Subject: [groff] 05/13: [groff]: Regression-test Savannah #58962.
Date: Sat, 16 Apr 2022 04:37:31 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 2b2aa19f41b6a49ba72af9108db538cb9ce54b16
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Apr 14 11:39:52 2022 +1000

    [groff]: Regression-test Savannah #58962.
    
    * src/roff/groff/handle_special_input_code_points.diff: Do it.
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  7 ++++
 src/roff/groff/groff.am                            |  1 +
 .../tests/handle_special_input_code_points.sh      | 43 ++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index b5a97cf2..4b4a81fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-04-14  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [groff]: Regression-test Savannah #58962.
+
+       * src/roff/groff/handle_special_input_code_points.diff: Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2022-04-14  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/troff/input.cpp (do_if_request): Clarify diagnostic;
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 69288a46..3d472683 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -45,6 +45,7 @@ groff_TESTS = \
   src/roff/groff/tests/dot-nm_register_works.sh \
   src/roff/groff/tests/evc_produces_no_output_if_invalid.sh \
   src/roff/groff/tests/fp_should_not_traverse_directories.sh \
+  src/roff/groff/tests/handle_special_input_code_points.sh \
   src/roff/groff/tests/html_works_with_grn_and_eqn.sh \
   src/roff/groff/tests/initialization_is_quiet.sh \
   src/roff/groff/tests/localization_works.sh \
diff --git a/src/roff/groff/tests/handle_special_input_code_points.sh 
b/src/roff/groff/tests/handle_special_input_code_points.sh
new file mode 100755
index 00000000..5a064a2a
--- /dev/null
+++ b/src/roff/groff/tests/handle_special_input_code_points.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 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"
+
+# Regression-test Savannah #58962.
+
+input='.if "�"\~" .tm input no-break space matches \\~
+.if "�"\%" .tm input soft hyphen matches \\%'
+
+fail=
+
+wail () {
+   echo "...FAILED"
+   fail=yes
+}
+
+output=$(printf "%s\n" "$input" | "$groff" -z 2>&1)
+
+printf "checking that input no-break space is mapped to \\~\n"
+echo "$output" | grep -qx 'input no-break space matches \\~' || wail
+
+printf "checking that input soft hyphen is mapped to \\%%\n"
+echo "$output" | grep -qx 'input soft hyphen matches \\%' || wail
+
+test -z "$fail"



reply via email to

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