[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 06/11: [mm]: Regression-test Savannah #65884.
From: |
G. Branden Robinson |
Subject: |
[groff] 06/11: [mm]: Regression-test Savannah #65884. |
Date: |
Sat, 15 Jun 2024 10:13:52 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 93948e20870f9740ce7de392e3e61c54a2a07f96
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jun 15 06:05:40 2024 -0500
[mm]: Regression-test Savannah #65884.
* contrib/mm/tests/P-indentation-works.sh: Do it.
---
contrib/mm/ChangeLog | 6 +++++
contrib/mm/tests/P-indentation-works.sh | 45 ++++++++++++++++++++++++++++++---
2 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 90092a90f..ea52a71b7 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,9 @@
+2024-06-15 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #65884.
+
+ * tests/P-indentation-works.sh: Do it.
+
2024-06-14 G. Branden Robinson <g.branden.robinson@gmail.com>
* mm.am (MMEXAMPLEFILES): Ship new "memorandum.mm" example in
diff --git a/contrib/mm/tests/P-indentation-works.sh
b/contrib/mm/tests/P-indentation-works.sh
index 5be7efdc5..93c240391 100755
--- a/contrib/mm/tests/P-indentation-works.sh
+++ b/contrib/mm/tests/P-indentation-works.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2023 Free Software Foundation, Inc.
+# Copyright (C) 2023-2024 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -61,9 +61,18 @@ list item
.P
P10 not indented.
.P
-P11 indented.'
+P11 indented.
+.H 1 "Heading Two"
+P12 not indented.
+.P
+P13 indented.
+.H 1 "Unidiomatic Heading Three"
+.P
+P14 not indented.
+.P
+P15 indented.'
-output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou)
+output=$(printf "%s\n" "$input" | "$groff" -rD3 -mm -Tascii -P-cbou)
echo "$output"
# P1 not indented.
@@ -91,11 +100,25 @@ echo "$output"
#
# P9 indented.
#
-# o list item
+# o list item
#
# P10 not indented.
#
# P11 indented.
+#
+#
+# 2. Heading Two
+#
+# P12 not indented.
+#
+# P13 indented.
+#
+#
+# 3. Unidiomatic Heading Three
+#
+# P14 not indented.
+#
+# P15 indented.
echo "checking that initial untyped paragraph not indented" >&2
echo "$output" | grep -Eqx ' {7}P1 not indented\.' || wail
@@ -130,6 +153,20 @@ echo "$output" | grep -Eqx ' {7}P10 not indented\.' || wail
echo "checking that second paragraph after list indented" >&2
echo "$output" | grep -Eqx ' {12}P11 indented\.' || wail
+echo "checking that implied paragraph after heading not indented" >&2
+echo "$output" | grep -Eqx ' {7}P12 not indented\.' || wail
+
+echo "checking that explicit paragraph after implied one indented" >&2
+echo "$output" | grep -Eqx ' {12}P13 indented\.' || wail
+
+echo "checking that first explicit paragraph after heading" \
+ "not indented" >&2
+echo "$output" | grep -Eqx ' {7}P14 not indented\.' || wail
+
+echo "checking that second explicit paragraph after heading" \
+ "not indented" >&2
+echo "$output" | grep -Eqx ' {12}P15 indented\.' || wail
+
test -z "$fail"
# vim:set ai et sw=4 ts=4 tw=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 06/11: [mm]: Regression-test Savannah #65884.,
G. Branden Robinson <=