Mercurial > hg
changeset 17540:f2bcc5975f10
test-hybridencode: a few more cases
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Thu, 13 Sep 2012 17:46:34 +0200 |
parents | bc7377160fa7 |
children | 3e3dfa7e6864 488e470634d8 |
files | tests/test-hybridencode.py tests/test-hybridencode.py.out |
diffstat | 2 files changed, 102 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-hybridencode.py Wed Sep 12 22:21:54 2012 +0200 +++ b/tests/test-hybridencode.py Thu Sep 13 17:46:34 2012 +0200 @@ -42,11 +42,27 @@ print "encoding directories ending in .hg, .i or .d with '.hg' suffix" show('data/x.hg/x.i/x.d/foo') +show('data/a.hg/a.i/a.d/foo') +show('data/au.hg/au.i/au.d/foo') +show('data/aux.hg/aux.i/aux.d/foo') +show('data/auxy.hg/auxy.i/auxy.d/foo') print "but these are not encoded on *filenames*" show('data/foo/x.hg') show('data/foo/x.i') show('data/foo/x.d') +show('data/foo/a.hg') +show('data/foo/a.i') +show('data/foo/a.d') +show('data/foo/au.hg') +show('data/foo/au.i') +show('data/foo/au.d') +show('data/foo/aux.hg') +show('data/foo/aux.i') +show('data/foo/aux.d') +show('data/foo/auxy.hg') +show('data/foo/auxy.i') +show('data/foo/auxy.d') print "plain .hg, .i and .d directories have the leading dot encoded" show('data/.hg/.i/.d/foo') @@ -95,6 +111,17 @@ show('data/conx/px/prx/prnx/ax/aux/auxx/nx/nux/nulx') show('data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul') +show('data/a./au./aux./auxy./aux.') +show('data/c./co./con./cony./con.') +show('data/p./pr./prn./prny./prn.') +show('data/n./nu./nul./nuly./nul.') +show('data/l./lp./lpt./lpt1./lpt1y./lpt1.') +show('data/lpt9./lpt9y./lpt9.') +show('data/com./com1./com1y./com1.') +show('data/com9./com9y./com9.') + +show('data/a /au /aux /auxy /aux ') + print "largest unhashed path" show('data/123456789-123456789-123456789-123456789-123456789-' 'unhashed--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-'
--- a/tests/test-hybridencode.py.out Wed Sep 12 22:21:54 2012 +0200 +++ b/tests/test-hybridencode.py.out Thu Sep 13 17:46:34 2012 +0200 @@ -38,6 +38,18 @@ A = 'data/x.hg/x.i/x.d/foo' B = 'data/x.hg.hg/x.i.hg/x.d.hg/foo' +A = 'data/a.hg/a.i/a.d/foo' +B = 'data/a.hg.hg/a.i.hg/a.d.hg/foo' + +A = 'data/au.hg/au.i/au.d/foo' +B = 'data/au.hg.hg/au.i.hg/au.d.hg/foo' + +A = 'data/aux.hg/aux.i/aux.d/foo' +B = 'data/au~78.hg.hg/au~78.i.hg/au~78.d.hg/foo' + +A = 'data/auxy.hg/auxy.i/auxy.d/foo' +B = 'data/auxy.hg.hg/auxy.i.hg/auxy.d.hg/foo' + but these are not encoded on *filenames* A = 'data/foo/x.hg' B = 'data/foo/x.hg' @@ -48,6 +60,42 @@ A = 'data/foo/x.d' B = 'data/foo/x.d' +A = 'data/foo/a.hg' +B = 'data/foo/a.hg' + +A = 'data/foo/a.i' +B = 'data/foo/a.i' + +A = 'data/foo/a.d' +B = 'data/foo/a.d' + +A = 'data/foo/au.hg' +B = 'data/foo/au.hg' + +A = 'data/foo/au.i' +B = 'data/foo/au.i' + +A = 'data/foo/au.d' +B = 'data/foo/au.d' + +A = 'data/foo/aux.hg' +B = 'data/foo/au~78.hg' + +A = 'data/foo/aux.i' +B = 'data/foo/au~78.i' + +A = 'data/foo/aux.d' +B = 'data/foo/au~78.d' + +A = 'data/foo/auxy.hg' +B = 'data/foo/auxy.hg' + +A = 'data/foo/auxy.i' +B = 'data/foo/auxy.i' + +A = 'data/foo/auxy.d' +B = 'data/foo/auxy.d' + plain .hg, .i and .d directories have the leading dot encoded A = 'data/.hg/.i/.d/foo' B = 'data/~2ehg.hg/~2ei.hg/~2ed.hg/foo' @@ -127,6 +175,33 @@ A = 'data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul' B = 'data/xcon/xp/xpr/xprn/xa/xau/xaux/xn/xnu/xnul' +A = 'data/a./au./aux./auxy./aux.' +B = 'data/a~2e/au~2e/au~78~2e/auxy~2e/au~78~2e' + +A = 'data/c./co./con./cony./con.' +B = 'data/c~2e/co~2e/co~6e~2e/cony~2e/co~6e~2e' + +A = 'data/p./pr./prn./prny./prn.' +B = 'data/p~2e/pr~2e/pr~6e~2e/prny~2e/pr~6e~2e' + +A = 'data/n./nu./nul./nuly./nul.' +B = 'data/n~2e/nu~2e/nu~6c~2e/nuly~2e/nu~6c~2e' + +A = 'data/l./lp./lpt./lpt1./lpt1y./lpt1.' +B = 'data/l~2e/lp~2e/lpt~2e/lp~741~2e/lpt1y~2e/lp~741~2e' + +A = 'data/lpt9./lpt9y./lpt9.' +B = 'data/lp~749~2e/lpt9y~2e/lp~749~2e' + +A = 'data/com./com1./com1y./com1.' +B = 'data/com~2e/co~6d1~2e/com1y~2e/co~6d1~2e' + +A = 'data/com9./com9y./com9.' +B = 'data/co~6d9~2e/com9y~2e/co~6d9~2e' + +A = 'data/a /au /aux /auxy /aux ' +B = 'data/a~20/au~20/aux~20/auxy~20/aux~20' + largest unhashed path A = 'data/123456789-123456789-123456789-123456789-123456789-unhashed--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345' B = 'data/123456789-123456789-123456789-123456789-123456789-unhashed--xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12345'