groff-commit
[Top][All Lists]
Advanced

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

[groff] 11/12: [groff]: Regression-test Savannah #64484.


From: G. Branden Robinson
Subject: [groff] 11/12: [groff]: Regression-test Savannah #64484.
Date: Tue, 19 Nov 2024 20:33:13 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 991677794ee58ae236c5888f8ed65cc96c065ff0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Nov 19 18:42:36 2024 -0600

    [groff]: Regression-test Savannah #64484.
    
    * src/roff/groff/tests/device-request-passes-most-escape-sequences.sh:
      Do it.
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  8 +++++
 src/roff/groff/groff.am                            |  1 +
 .../device-request-passes-most-escape-sequences.sh | 36 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 61e766840..3bb59a237 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-11-19  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [groff]: Regression-test Savannah #64484.
+
+       * src/roff/groff/tests/\
+       device-request-passes-most-escape-sequences.sh: Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2024-11-19  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/soelim/soelim.1.man (Description):
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index ee223dc99..65d9db50c 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -49,6 +49,7 @@ groff_TESTS = \
   src/roff/groff/tests/detect-evil-link-time-optimizer.sh \
   src/roff/groff/tests/device-control-escapes-express-basic-latin.sh \
   src/roff/groff/tests/device-control-special-character-handling.sh \
+  src/roff/groff/tests/device-request-passes-most-escape-sequences.sh \
   src/roff/groff/tests/device-request-works.sh \
   src/roff/groff/tests/do-not-loop-infinitely-when-breaking-cjk.sh \
   src/roff/groff/tests/dot-cp-register-works.sh \
diff --git 
a/src/roff/groff/tests/device-request-passes-most-escape-sequences.sh 
b/src/roff/groff/tests/device-request-passes-most-escape-sequences.sh
new file mode 100755
index 000000000..7ed1a5a5d
--- /dev/null
+++ b/src/roff/groff/tests/device-request-passes-most-escape-sequences.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 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 #64484.
+#
+# The `device` request should not alter any escape sequences except
+# those encoding special characters.
+
+output=$(printf \
+  '.device ps:exec A B\\~C\\ D\\0E\\|F\\^G\\h".5m"H\\v".5m"I\002\n' \
+  | "$groff" -T ps -Zww | grep '^x X ')
+# Use printf instead of echo; the latter might interpret `\v`.
+printf '%s\n' "$output"
+printf '%s\n' "$output" \
+  | grep -Fqx 'x X ps:exec A B\~C\ D\0E\|F\^G\h".5m"H\v".5m"I'
+
+# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:



reply via email to

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