groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/05: [tests]: Remove Bashism.


From: G. Branden Robinson
Subject: [groff] 03/05: [tests]: Remove Bashism.
Date: Fri, 25 Dec 2020 06:31:53 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 1040c881dfc2cce902d9441d15e13746370d146b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Dec 25 20:49:46 2020 +1100

    [tests]: Remove Bashism.
    
    * src/roff/groff/tests/string_case_xform_unicode_escape.sh: Fix test to
      no longer use Bash process substitution, resulting in nondeterministic
      file descriptor numbers appearing in test logs, frustrating
      reproducible builds.
    
      Also fix a dumb thinko in test construction, which would have
      prevented an XPASS even if it could have happened.
    
    See <https://savannah.gnu.org/bugs/?57218>.
---
 ChangeLog                                                | 9 +++++++++
 src/roff/groff/tests/string_case_xform_unicode_escape.sh | 6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 332e96e..f40acf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2020-12-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * src/roff/groff/tests/string_case_xform_unicode_escape.sh: Fix
+       test to no longer use Bash process substitution, resulting in
+       nondeterministic file descriptor numbers appearing in test logs,
+       frustrating reproducible builds.
+
+       See <https://savannah.gnu.org/bugs/?57218>.
+
+2020-12-25  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * contrib/pdfmark/pdfmark.am (PDFROFF): Call pdfroff without
        `--keep-temporary-files` option.  Temporary directories are
        created with mktemp(1) and files with an embedded process
diff --git a/src/roff/groff/tests/string_case_xform_unicode_escape.sh 
b/src/roff/groff/tests/string_case_xform_unicode_escape.sh
index df7322c..529e0c3 100755
--- a/src/roff/groff/tests/string_case_xform_unicode_escape.sh
+++ b/src/roff/groff/tests/string_case_xform_unicode_escape.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 # Copyright (C) 2019-2020 Free Software Foundation, Inc.
 #
@@ -30,7 +30,7 @@ expected="attaché ATTACHÉ"
 # troff: <standard input>:5: warning: can't find special character
 #     'U0065_0301'
 
-actual=$("$groff" -Tutf8 2>&1 > /dev/null <<EOF
+actual=$("$groff" -Tutf8 2>&1 <<EOF
 .pl 1v
 .ds attache attach\\[u0065_0301]\\\"
 \\*[attache]
@@ -39,4 +39,4 @@ actual=$("$groff" -Tutf8 2>&1 > /dev/null <<EOF
 EOF
 )
 
-diff -u <(echo "$expected") <(echo "$actual")
+echo "$actual" | grep -Fqx "$expected"



reply via email to

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