about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to '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();