diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-12-02 23:44:15 -0600 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-12-07 02:51:57 -0600 |
commit | 30b70198165109b0f216f6fb544575ecf8716dbf (patch) | |
tree | 0969f94e7fbb7ff5fd3dcbf260c460c894e76ec6 /tmac/tests/an-ext_UR-works.sh | |
parent | b7951b50439db6fea1e6af25bcb71c503bd6db4f (diff) | |
download | groff-git-30b70198165109b0f216f6fb544575ecf8716dbf.tar.gz |
tmac/an-ext.tmac: Get out of hyperlink business.
* tmac/an-ext.tmac: Remove groff-feature-dependent code for hyperlink
management, greatly reducing the size of the file, which we
permissively license and encourage people to copy around. Drop
register definitions corresponding to groff-specific output device
names. Drop definition and use of `mL` and `mR` strings for angle
brackets; no observable change on non-groff formatters.
(mV): Radically simplify. This internal "back-end" for `MT` and `UR`
now just stores its argument in a string, `m1`.
(mQ): Radically simplify. This internal "back-end" for `ME` and `UE`
now just disables automatic hyphenation, formats the saved `m1` string
between angle brackets, suffixes it with the optional argument, and
restores automatic hyphenation.
(UR, MT): Call `mV` with one argument, not nine.
(UE, ME): Call `mQ` with one argument, not nine.
* tmac/tests/an-ext_MR-works.sh:
* tmac/tests/an-ext_MT-body-hyphenates.sh:
* tmac/tests/an-ext_MT-works.sh:
* tmac/tests/an-ext_UR-works.sh: Run tests with `mG` register cleared.
* tmac/tests/an-ext_MR-works.sh: Add test of this file's simplified `MR`
implementation.
* tmac/tests/an-ext_MT-works.sh:
* tmac/tests/an-ext_UR-works.sh: Move tests of groff-specific hyperlink
output from here...
* tmac/tests/an_MT-works.sh:
* tmac/tests/an_UR-works.sh: ...to these new files.
* tmac/tests/an_MR-works.sh:
* tmac/tests/an_MT-works.sh:
* tmac/tests/an_UR-works.sh: Add tests for valid HTML formatting of
hyperlinks, which experience shows is a bit fragile in the face of
diversion manipulation and output line continuation.
* tmac/tmac.am (tmac_TESTS): Run new tests.
* tmac/tests/an-ext_link-macros-work-in-paragraph-tags.sh: Rename...
* tmac/tests/an_link-macros-work-in-paragraph-tags.sh: ...to this.
* tmac/tmac.am (tmac_TESTS): Reflect test renames.
The following 5 tests fail at this commit due to the groff-enhanced MR,
MT, ME, UR, and UE implementations going missing. This will be fixed in
the next few commits.
FAIL: tmac/tests/an_MR-works.sh
FAIL: tmac/tests/an_MT-works.sh
FAIL: tmac/tests/an_UR-works.sh
FAIL: tmac/tests/an_adjust-link-text-correctly.sh
FAIL: tmac/tests/an_link-macros-work-in-paragraph-tags.sh
Diffstat (limited to 'tmac/tests/an-ext_UR-works.sh')
-rwxr-xr-x | tmac/tests/an-ext_UR-works.sh | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/tmac/tests/an-ext_UR-works.sh b/tmac/tests/an-ext_UR-works.sh index 074225817..bf5a1abd3 100755 --- a/tmac/tests/an-ext_UR-works.sh +++ b/tmac/tests/an-ext_UR-works.sh @@ -40,30 +40,17 @@ Or .UR http://\:bar\:.example\:.com .UE .' -output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -man -rU0) +output=$(printf "%s\n" "$input" \ + | "$groff" -rmG=0 -Tascii -P-cbou -man -rU0) echo "$output" -echo "checking formatting of web URI with link text" \ - "(hyperlinks disabled)" >&2 +echo "checking formatting of web URI with link text" >&2 echo "$output" | grep -Fq 'See figure 1 <http://foo.example.com>.' \ || wail - -echo "checking formatting of web URI with no link text" \ - "(hyperlinks disabled)" >&2 +echo "checking formatting of web URI with no link text" >&2 echo "$output" | grep -Fq 'Or <http://bar.example.com>.' || wail -output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -man -rU1) -echo "$output" - -echo "checking formatting of web URI with link text" \ - "(hyperlinks enabled)" >&2 -echo "$output" | grep -Fq 'See figure 1.' || wail - -echo "checking formatting of web URI with no link text" \ - "(hyperlinks enabled)" >&2 -echo "$output" | grep -Fq 'Or http://bar.example.com.' || wail - test -z "$fail" # vim:set ai et sw=4 ts=4 tw=72: |