gbranden pushed a commit to branch master
in repository groff.
commit 3a06689e7b78a7ba4a4c50881310e87078a30303
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jun 20 14:10:24 2024 -0500
[grog]: Regression-test Savannah #65902.
* src/utils/grog/tests/detect-chem.sh: Do it.
* src/utils/grog/grog.am (grog_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 7 +++++++
src/utils/grog/grog.am | 1 +
src/utils/grog/tests/detect-chem.sh | 41 +++++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 69d6d600e..fdcfd8177 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-20 G. Branden Robinson <[email protected]>
+
+ Regression-test Savannah #65902.
+
+ * src/utils/grog/tests/detect-chem.sh: Do it.
+ * src/utils/grog/grog.am (grog_TESTS): Run test.
+
2024-06-20 G. Branden Robinson <[email protected]>
* src/roff/troff/mtsm.cpp (mtsm::inherit): Fix failing test.
diff --git a/src/utils/grog/grog.am b/src/utils/grog/grog.am
index f7ca5eb5b..2c3fcf05e 100644
--- a/src/utils/grog/grog.am
+++ b/src/utils/grog/grog.am
@@ -36,6 +36,7 @@ grog: $(grog_srcdir)/grog.pl $(SH_DEPS_SED_SCRIPT)
grog_TESTS = \
src/utils/grog/tests/PF-does-not-start-pic-region.sh \
src/utils/grog/tests/avoid-refer-fakeout.sh \
+ src/utils/grog/tests/detect-chem.sh \
src/utils/grog/tests/preserve-groff-options.sh \
src/utils/grog/tests/recognize-perl-pod.sh \
src/utils/grog/tests/smoke-test.sh
diff --git a/src/utils/grog/tests/detect-chem.sh
b/src/utils/grog/tests/detect-chem.sh
new file mode 100755
index 000000000..6b75ebb01
--- /dev/null
+++ b/src/utils/grog/tests/detect-chem.sh
@@ -0,0 +1,41 @@
+#!/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/>.
+#
+
+grog="${abs_top_builddir:-.}/grog"
+
+# Regression-test Savannah #65902.
+#
+# Detect use of chem(1) preprocessor.
+
+input='
+.br
+.cstart
+ CH3
+ bond
+ CH2
+ bond
+.cend'
+
+output=$(echo "$input" | "$grog")
+echo "$output"
+
+echo "$output" | grep -Fqx 'groff -j -'
+
+# vim:set ai et sw=4 ts=4 tw=72:
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit