X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhl_mod.t;h=fc7b712cea6945a4031274e63d0c05c6ed669e16;hb=1bbfab375438f149dcff9047dd0c5ed3a08eed53;hp=f2eb5f918765729b2d496402fbf0ef2ed1e3218a;hpb=8eb2c4f7c0aed11810280c6dfa63f75fd961e3cd;p=public-inbox.git diff --git a/t/hl_mod.t b/t/hl_mod.t index f2eb5f91..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/'/'/sg; + IPC::Run::run($cmd, \('
'.$$ref.'
'), \$out, \$err); # expand tabs and normalize whitespace, # w3m doesn't preserve tabs @@ -40,4 +44,24 @@ my $orig = $str; } } +if ('experimental, only for help text') { + my $tmp = <<'EOF'; +:> +```perl +my $foo = 1 & 2; +``` +:< +EOF + $hls->do_hl_text(\$tmp); + my @hl = split(/^/m, $tmp); + is($hl[0], ":>\n", 'first line escaped'); + is($hl[1], "```perl\n", '2nd line preserved'); + like($hl[2], qr/