X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fhval.t;h=2af4d2af5c8fc7119b25249f61ee6376efe1f68c;hp=a3712666d617511a5fc8fcc2b376244fc38b1014;hb=ec24b4af88d7922e4bf9846e76b9455fb6a5bda4;hpb=38c481a5438593cff686709493a70b8a6b3033d1 diff --git a/t/hval.t b/t/hval.t index a3712666..2af4d2af 100644 --- a/t/hval.t +++ b/t/hval.t @@ -32,4 +32,14 @@ EOF is($html, $exp, 'only obfuscated relevant addresses'); +is('foo-bar', PublicInbox::Hval::to_filename('foo bar '), + 'to_filename has no trailing -'); + +is('foo-bar', PublicInbox::Hval::to_filename("foo bar\nanother line\n"), + 'to_filename has no repeated -, and nothing past LF'); + +is('foo.bar', PublicInbox::Hval::to_filename("foo....bar"), + 'to_filename squeezes -'); + + done_testing();