--- a/tests/test-hybridencode.py Wed Sep 05 23:59:27 2012 +0900
+++ b/tests/test-hybridencode.py Thu Sep 06 19:53:23 2012 +0200
@@ -365,3 +365,20 @@
show('data/12345678/12345678/12345678/12345678/12345678/12345'
'678/12345678/123456/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
'123456789-123456')
+
+print "hashed path that drops dir 8 due to dot or space at end is"
+print "encoded, and thus causing to hit _maxshortdirslen"
+show('data/12345678/12345678/12345678/12345678/12345678/12345'
+ '678/12345678/1234./-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+ '123456789-123456')
+show('data/12345678/12345678/12345678/12345678/12345678/12345'
+ '678/12345678/1234 /-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+ '123456789-123456')
+
+print "... with dir 8 short enough for encoding"
+show('data/12345678/12345678/12345678/12345678/12345678/12345'
+ '678/12345678/12./xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+ '123456789-123456')
+show('data/12345678/12345678/12345678/12345678/12345678/12345'
+ '678/12345678/12 /xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+ '123456789-123456')