about summary refs log tree commit homepage
path: root/t/hval.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-10-04 22:54:23 +0000
committerEric Wong <e@80x24.org>2017-10-04 23:35:28 +0000
commitec24b4af88d7922e4bf9846e76b9455fb6a5bda4 (patch)
tree435c91ff81c59448db3fd4ee3c919985ab9d521e /t/hval.t
parent38c481a5438593cff686709493a70b8a6b3033d1 (diff)
downloadpublic-inbox-ec24b4af88d7922e4bf9846e76b9455fb6a5bda4.tar.gz
This is hopefully more sensical than "raw" files from
resulting downloads.
Diffstat (limited to 't/hval.t')
-rw-r--r--t/hval.t10
1 files changed, 10 insertions, 0 deletions
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();