summaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-13 18:41:42 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-13 20:22:48 -0600
commit4392979e9d616aebd376f5aac69a08277b7820dc (patch)
treeab38c4284584fea78331329f3753ec99352b131a /HACKING
parent27057ea197f108ba657cc2f8bc4546de6c479946 (diff)
downloadgroff-git-4392979e9d616aebd376f5aac69a08277b7820dc.tar.gz
[tmac]: Work around macOS od (mis-)behavior.
* tmac/tests/latin2_works.sh: * tmac/tests/latin5_works.sh: * tmac/tests/latin9_works.sh: Port to work around macOS's apparently POSIX non-conforming 'od' command. Use single-byte octal output format instead of "character", and update test expectations accordingly. Apparently gratuitously, macOS also puts more spaces after the octal address field when using this output format. * HACKING: Document, and elaborate upon, this problem. Also distinguish identical test failure diagnostics. ANNOUNCE: Remove caveat about automated test failures on macOS.
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING13
1 files changed, 13 insertions, 0 deletions
diff --git a/HACKING b/HACKING
index 9084c86b5..54ca770e7 100644
--- a/HACKING
+++ b/HACKING
@@ -92,6 +92,19 @@ Here are some portability notes on writing automated tests.
might need to be weakened to the following on macOS.
grep -Eqx '0000000 +A +\\b +B +\\b +C D +\\n *'
+* The "od" command on macOS does not respect the environment variable
+ assignment "LC_ALL=C" when processing byte values 127<x<256 decimal
+ and using the "character" output format (option "-t c"). An
+ alternative output must be used, like bytewise octal (option "-t o1").
+ (macOS od may be non-conforming here, despite the claim of its man
+ page. POSIX Issue 4 od's description says "The type specifier
+ character c specifies that bytes will be interpreted as characters
+ specified by the current setting of the LC_CTYPE locale category. ...
+ Other non-printable characters will be written as one three-digit
+ octal number for each byte in the character." (p. 538) The language
+ in Issue 7 (2018) appears unchanged.
+ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/od.html )
+
* macOS sed requires semicolons after commands even if they are followed
immediately by a closing brace.