changeset 17453:97899a01d3e5

test-hybridencode: adding one truncated char to dir 1..7 won't drop dir 8
author Adrian Buehlmann <adrian@cadifra.com>
date Thu, 06 Sep 2012 15:53:59 +0200
parents 4aec89d4faa2
children 2212af23c9de
files tests/test-hybridencode.py tests/test-hybridencode.py.out
diffstat 2 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-hybridencode.py	Thu Sep 06 15:04:07 2012 +0200
+++ b/tests/test-hybridencode.py	Thu Sep 06 15:53:59 2012 +0200
@@ -337,6 +337,29 @@
           '678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
           '123456789-123456')
 
+print "...adding one truncated char to dir 1..7 won't drop dir 8"
+show('data/12345678x/12345678/12345678/12345678/12345678/12345'
+          '678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+show('data/12345678/12345678x/12345678/12345678/12345678/12345'
+          '678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+show('data/12345678/12345678/12345678x/12345678/12345678/12345'
+          '678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+show('data/12345678/12345678/12345678/12345678x/12345678/12345'
+          '678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+show('data/12345678/12345678/12345678/12345678/12345678x/12345'
+          '678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+show('data/12345678/12345678/12345678/12345678/12345678/12345'
+          '678x/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+show('data/12345678/12345678/12345678/12345678/12345678/12345'
+          '678/12345678x/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
+          '123456789-123456')
+
 print "hashed path with shortest dropped directory 8"
 print "(just hitting the _maxshortdirslen boundary)"
 show('data/12345678/12345678/12345678/12345678/12345678/12345'
--- a/tests/test-hybridencode.py.out	Thu Sep 06 15:04:07 2012 +0200
+++ b/tests/test-hybridencode.py.out	Thu Sep 06 15:53:59 2012 +0200
@@ -332,6 +332,28 @@
 A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
 B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/-xxxxxxx4d43d1ccaa20efbfe99ec779dc063611536ff2c5'
 
+...adding one truncated char to dir 1..7 won't drop dir 8
+A = 'data/12345678x/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxx0f9efce65189cc60fd90fe4ffd49d7b58bbe0f2e'
+
+A = 'data/12345678/12345678x/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxx945ca395708cafdd54a94501859beabd3e243921'
+
+A = 'data/12345678/12345678/12345678x/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxac62bf6898c4fd0502146074547c11caa751a327'
+
+A = 'data/12345678/12345678/12345678/12345678x/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxx2ae5a2baed7983fae8974d0ca06c6bf08b9aee92'
+
+A = 'data/12345678/12345678/12345678/12345678/12345678x/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxx214aba07b6687532a43d1e9eaf6e88cfca96b68c'
+
+A = 'data/12345678/12345678/12345678/12345678/12345678/12345678x/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxe7a022ae82f0f55cf4e0498e55ba59ea4ebb55bf'
+
+A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678x/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'
+B = 'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxb51ce61164996a80f36ce3cfe64b62d519aedae3'
+
 hashed path with shortest dropped directory 8
 (just hitting the _maxshortdirslen boundary)
 A = 'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/123456/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-123456'