gbranden pushed a commit to branch master
in repository groff.

commit 31eba4910c32c0259089eae0d9183a8f5f991e27
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Sep 2 03:11:44 2024 -0500

    [man]: Tweak tests to be more robust.
    
    Don't fail if debugging diagnostics are produced.
---
 tmac/tests/an_UE-breaks-before-long-URIs.sh |  5 +++--
 tmac/tests/an_works-with-ec.sh              | 10 +++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/tmac/tests/an_UE-breaks-before-long-URIs.sh 
b/tmac/tests/an_UE-breaks-before-long-URIs.sh
index 97a9d6f0e..fcabbb894 100755
--- a/tmac/tests/an_UE-breaks-before-long-URIs.sh
+++ b/tmac/tests/an_UE-breaks-before-long-URIs.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2021 Free Software Foundation, Inc.
+# Copyright (C) 2021-2024 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -51,7 +51,8 @@ wail () {
 output=$(printf "%s" "$input" | "$groff" -rU0 -man -Tascii -P-cbou)
 echo "$output"
 error=$(printf "%s" "$input" \
-    | "$groff" -rU0 -man -Tascii -P-cbou -ww -z 2>&1)
+    | "$groff" -rU0 -man -Tascii -P-cbou -ww -z 2>&1 \
+    | grep -v ': debug:')
 
 echo "testing that no diagnostic messages are produced" >&2
 test -z "$error" || wail
diff --git a/tmac/tests/an_works-with-ec.sh b/tmac/tests/an_works-with-ec.sh
index 2ddb8e85f..9387aa684 100755
--- a/tmac/tests/an_works-with-ec.sh
+++ b/tmac/tests/an_works-with-ec.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Copyright (C) 2024 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -33,8 +33,12 @@ input=$(
   printf 'foo \\- \\[%%0]\\fIgroff\n';
 )
 
-output=$(printf "%s\n" "$input" | "$groff" -man -mec -Tdvi -z 2>&1)
-echo "$output"
+# Verify that this command produced no diagnostics.
+
+output=$(printf "%s\n" "$input" | "$groff" -m an -m ec -T dvi -z 2>&1 \
+    | grep -v ': debug:')
+test -n "$output" && echo "$output"
+
 test -z "$output"
 
 # vim:set ai et sw=4 ts=4 tw=72:

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to