about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-04-19 08:09:31 +0000
committerEric Wong <e@80x24.org>2019-04-19 08:12:55 +0000
commitd88d992927467a9d5bc2733cc01e3dda4c5de234 (patch)
treee49a6ea7dfa4078766cd6038939789e420fa9531
parente55bef366b87ecbcb66c93669f41876afc1d2446 (diff)
downloadpublic-inbox-d88d992927467a9d5bc2733cc01e3dda4c5de234.tar.gz
t/hl_mod: workaround w3m not handling &apos;
This fixes a test failure on my Debian buster system.

Bug report filed for w3m to handle "&apos;":

	https://bugs.debian.org/927409

and for "highlight" to favor "&#39;" in case other browsers fail:

	https://bugs.debian.org/927410
-rw-r--r--t/hl_mod.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/hl_mod.t b/t/hl_mod.t
index 84a4b576..fc7b712c 100644
--- a/t/hl_mod.t
+++ b/t/hl_mod.t
@@ -30,6 +30,10 @@ my $orig = $str;
                 require File::Temp;
                 my $cmd = [ qw(w3m -T text/html -dump -config /dev/null) ];
                 my ($out, $err) = ('', '');
+
+                # workaround https://bugs.debian.org/927409
+                $$ref =~ s/&apos;/&#39;/sg;
+
                 IPC::Run::run($cmd, \('<pre>'.$$ref.'</pre>'), \$out, \$err);
                 # expand tabs and normalize whitespace,
                 # w3m doesn't preserve tabs