[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: |
Mon, 30 Dec 2019 17:30:29 +0000 |
Hi Ingo,
> - The lone "'" inside the here document inside $() results in
> ./src/roff/groff/tests/on-latin1-device-oq-is-0x27.sh[36]: no closing quote
> with ksh.
I think that's a ksh bug. https://manned.org/ksh.1 can be searched for
`<<' and the entry doesn't suggest quote needs escaping.
Heirloom sh is happy with it if I replace $() with ``. That's a handy
unalduterated shell. I don't think POSIX states the single quote
requires escaping.
https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_07_04
> So much quoting and escaping is hard to read either way.
I think the printf method can be improved.
> -actual=$("$groff" -Tlatin1 <<EOF
> -.pl 1v
> -\[oq] = '
> -EOF
> -)
> +actual=$(printf ".pl 1v\n\\\\[oq] = '\n" | "$groff" -Tlatin1)
$ printf ".pl 1v\n\\\\[oq] = '\n"
.pl 1v
\[oq] = '
$ printf ".pl 1v\n\\\\[oq] = '\n" | sha1sum
86c0cab47574a3b6ee5a89d9472d1751ff6f97dc -
$ printf '%s\n' '.pl 1v' '\[oq] = '\' | sha1sum
86c0cab47574a3b6ee5a89d9472d1751ff6f97dc -
> - The <() syntax looks like a GNUism to me.
It isn't Bourne shell.
--
Cheers, Ralph.
- Re: pic anomalies, (continued)
- Re: pic anomalies, Eric S. Raymond, 2019/12/27
- Re: pic anomalies, Ingo Schwarze, 2019/12/27
- 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 <=
- Re: GNUism in groff tests, G. Branden Robinson, 2019/12/31
- Re: GNUism in groff tests, Ralph Corderoy, 2019/12/31
- 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