diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-02-13 11:58:40 -0600 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-02-13 12:07:04 -0600 |
commit | dd4511bfb08cd9b7ba8dae64eed32c9c5d57defe (patch) | |
tree | 280aa4ce3884d0ac76ab72ad6e66b9f64dc8d5c8 /HACKING | |
parent | a47e8985205d6c564b66e0d780b5893dabc6c84d (diff) | |
download | groff-git-dd4511bfb08cd9b7ba8dae64eed32c9c5d57defe.tar.gz |
[mdoc]: Port a test to work with macOS sed.
* tmac/tests/doc_heading-font-remapping-works.sh: Put semicolons between
commands and closing braces in sed script. Put each of multiple
closing braces on a separate input line, because macOS doesn't accept
them otherwise. Resolves test failure observed on macOS.
* HACKING: Document the closing brace sequence problem.
* ANNOUNCE: Drop notice of failing test case, now resolved.
Diffstat (limited to 'HACKING')
-rw-r--r-- | HACKING | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -95,8 +95,8 @@ Here are some portability notes on writing automated tests. sed -n '/Foo\./{n;s/^$/FAILURE/;p;}' * POSIX doesn't say that sed has to accept semicolons as command - separators after label (':') and branch ('t') commands, so it doesn't. - GNU sed does. + separators after label (':') and branch ('t') commands, or after brace + commands, so it doesn't. GNU sed does. So rewrite tidy, compact sed scripts like this: sed -n '/Foo\./{n;s/^$/FAILURE/;tA;s/.*/SUCCESS/;:A;p}' @@ -105,3 +105,13 @@ Here are some portability notes on writing automated tests. -e '/Foo\./{n;s/^$/FAILURE/;tA;' \ -e 's/.*/SUCCESS/;:A;' \ -e 'p;}') + + Similarly, a brace sequence like that in this partial sed script: + /f1/p}}}}}} + must be rewritten as follows. + /f1/p;} + } + } + } + } + } |