From 22d8fcc3d37b9ce13a5088f1d0557078c9a84062 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 2 Oct 2015 21:15:07 +0000 Subject: rename mid_compress to id_compress We use it as a general compressor for identifiers such as subject paths, so using the "mid_" prefix probably is not appropriate. --- t/view.t | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 't') diff --git a/t/view.t b/t/view.t index 325f509c..568ab303 100644 --- a/t/view.t +++ b/t/view.t @@ -145,13 +145,12 @@ EOF like($html, qr/\bhi = bye\b/, "HTML output decoded QP"); } - -{ # XXX dirty hack - use PublicInbox::MID qw/mid_compress/; - like(mid_compress('foo%bar@wtf'), qr/\A[a-f0-9]{40}\z/, +{ + use PublicInbox::MID qw/id_compress/; + like(id_compress('foo%bar@wtf'), qr/\A[a-f0-9]{40}\z/, "percent always converted to sha1 to workaround buggy httpds"); - is(mid_compress('foobar@wtf'), 'foobar@wtf', - 'regular MID not compressed'); + is(id_compress('foobar-wtf'), 'foobar-wtf', + 'regular ID not compressed'); } done_testing(); -- cgit v1.2.3-24-ge0c7