groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/03: Add regression test for Savannah #59812.


From: G. Branden Robinson
Subject: [groff] 02/03: Add regression test for Savannah #59812.
Date: Thu, 25 Feb 2021 01:45:57 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit b80434b3ebaef62fb8951c4b0b7c3de023742f1d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Feb 25 15:08:56 2021 +1100

    Add regression test for Savannah #59812.
    
    * src/preproc/tbl/tests/cooperate-with-nm-request.sh: Do it.
    * src/preproc/tbl/tbl.am (tbl_TEST): Run test.
    
    Test will fail at this commit.
---
 ChangeLog                                          |  7 ++++
 src/preproc/tbl/tbl.am                             |  1 +
 src/preproc/tbl/tests/cooperate-with-nm-request.sh | 47 ++++++++++++++++++++++
 3 files changed, 55 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index e895bf9..5731db7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-02-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       Add regression test for Savannah #59812.
+
+       * src/preproc/tbl/tests/cooperate-with-nm-request.sh: Do it.
+       * src/preproc/tbl/tbl.am (tbl_TEST): Run test.
+
+2021-02-25  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        Implement new read-only register ".nm".  It reports the
        enablement status of output line numbering (caused by the .nm
        request) irrespective of the temporary suspension of numbering
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
index 96d2073..8ae8dce 100644
--- a/src/preproc/tbl/tbl.am
+++ b/src/preproc/tbl/tbl.am
@@ -25,6 +25,7 @@ PREFIXMAN1 += src/preproc/tbl/tbl.1
 EXTRA_DIST += src/preproc/tbl/tbl.1.man
 
 tbl_TESTS = \
+  src/preproc/tbl/tests/cooperate-with-nm-request.sh \
   src/preproc/tbl/tests/save-and-restore-hyphenation-parameters.sh \
   src/preproc/tbl/tests/save-and-restore-tab-stops.sh
 TESTS += $(tbl_TESTS)
diff --git a/src/preproc/tbl/tests/cooperate-with-nm-request.sh 
b/src/preproc/tbl/tests/cooperate-with-nm-request.sh
new file mode 100755
index 0000000..cfbd750
--- /dev/null
+++ b/src/preproc/tbl/tests/cooperate-with-nm-request.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 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
+
+# Regression-test Savannah #59812.
+#
+# A nonzero value of \n[ln] should not cause spurious numbering of table
+# rows.
+
+DOC='\
+.nf
+foo
+.nm 1
+bar
+.nm
+baz
+.TS
+l.
+qux
+.TE
+'
+
+OUTPUT=$(printf "%s" "$DOC" | "$groff" -Tascii -t)
+
+echo "$OUTPUT" | grep -Fqx qux
+
+# vim:set ai noet sw=4 ts=4 tw=72:



reply via email to

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