[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUism in groff tests
From: |
Ralph Corderoy |
Subject: |
Re: GNUism in groff tests |
Date: |
Tue, 31 Dec 2019 09:02:52 +0000 |
Hi Branden,
> > Heirloom sh is happy with it if I replace $() with ``.
>
> Oy vey. That's a cure worse than the disease!
I was just using that as an another data point; a Bourne shell doesn't
require the single quote to be escaped.
Returning to the original,
http://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/tests/on-latin1-device-oq-is-0x27.sh
expected="' = '"
actual=$("$groff" -Tlatin1 <<EOF
.pl 1v
\[oq] = '
EOF
)
diff -u <(echo "$expected") <(echo "$actual")
It looks like the test harness needs a common shell script that provides
convenience functions. Then the test script can read more like
# All run under `set -eu' with a trap on EXIT.
title 'Check -Tlatin1's \(oq'
in=$(tmp) want=$(tmp) # Values won't need quoting.
cat >$in <<\E
.pl 1
\e(oq = \(oq
E
echo '\(oq = `' >$want
got=$(tmp) err=$(tmp)
run "$groff" -Tlatin <$in >$got 2>$err # Allows inserting valgrind(1).
empty $err
equal $got $want # If different, shows start of diff output.
cleanup # Removes tmp files if tests successful.
with the functions evolving over time to suit groff's needs, and
presumably fitting in with Automake's parallel-test harness, if that's
what's being used.
--
Cheers, Ralph.
- Re: pic anomalies, (continued)
- Re: pic anomalies, Eric S. Raymond, 2019/12/27
- Re: pic anomalies, Ingo Schwarze, 2019/12/29
- Re: pic anomalies, Colin Watson, 2019/12/29
- Re: pic anomalies, Larry McVoy, 2019/12/29
- Re: pic anomalies, Ingo Schwarze, 2019/12/30
- Re: pic anomalies, Colin Watson, 2019/12/30
- GNUism in groff tests, was: pic anomalies, Ingo Schwarze, 2019/12/30
- Re: GNUism in groff tests, Ingo Schwarze, 2019/12/30
- Re: GNUism in groff tests, Ralph Corderoy, 2019/12/30
- Re: GNUism in groff tests, G. Branden Robinson, 2019/12/31
- Re: GNUism in groff tests,
Ralph Corderoy <=
- Re: GNUism in groff tests, Ingo Schwarze, 2019/12/31
- Re: GNUism in groff tests, Colin Watson, 2019/12/30
- Re: GNUism in groff tests, G. Branden Robinson, 2019/12/31
- Re: GNUism in groff tests, Ingo Schwarze, 2019/12/31
- Re: GNUism in groff tests, was: pic anomalies, John Gardner, 2019/12/30
- Re: GNUism in groff tests, was: pic anomalies, Larry McVoy, 2019/12/30
- Re: GNUism in groff tests, was: pic anomalies, G. Branden Robinson, 2019/12/31
- Re: GNUism in groff tests, was: pic anomalies, Ralph Corderoy, 2019/12/31
- Re: GNUism in groff tests, was: pic anomalies, Ralph Corderoy, 2019/12/31
- Re: GNUism in groff tests, was: pic anomalies, John Gardner, 2019/12/31