--- 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')
--- a/tests/test-hybridencode.py.out Wed Sep 05 23:59:27 2012 +0900
+++ b/tests/test-hybridencode.py.out Thu Sep 06 19:53:23 2012 +0200
@@ -359,3 +359,18 @@
A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/123456/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/xxxxxxxxx-xxxx11fa9873cc6c3215eae864528b5530a04efc6cfe'
+hashed path that drops dir 8 due to dot or space at end is
+encoded, and thus causing to hit _maxshortdirslen
+A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/1234./-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/-xxxxxxxxx-xxx602df9b45bec564e2e1f0645d5140dddcc76ed58'
+
+A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/1234 /-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/-xxxxxxxxx-xxxd99ff212bc84b4d1f70cd6b0071e3ef69d4e12ce'
+
+... with dir 8 short enough for encoding
+A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12./xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12~2e/xx-xxxxx7baeb5ed7f14a586ee1cacecdbcbff70032d1b3c'
+
+A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12 /xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12~20/xx-xxxxxcf79ca9795f77d7f75745da36807e5d772bd5182'
+