##// END OF EJS Templates
encoding: extend test cases for utf8b...
Matt Mackall -
r26963:de5ae97c default
parent child Browse files
Show More
@@ -497,11 +497,17 b' def fromutf8b(s):'
497 is a round-trip process for strings like filenames, but metadata
497 is a round-trip process for strings like filenames, but metadata
498 that's was passed through tolocal will remain in UTF-8.
498 that's was passed through tolocal will remain in UTF-8.
499
499
500 >>> roundtrip = lambda x: fromutf8b(toutf8b(x)) == x
500 >>> m = "\\xc3\\xa9\\x99abcd"
501 >>> m = "\\xc3\\xa9\\x99abcd"
501 >>> n = toutf8b(m)
502 >>> toutf8b(m)
502 >>> n
503 '\\xc3\\xa9\\xed\\xb2\\x99abcd'
503 '\\xc3\\xa9\\xed\\xb2\\x99abcd'
504 >>> fromutf8b(n) == m
504 >>> roundtrip(m)
505 True
506 >>> roundtrip("\\xc2\\xc2\\x80")
507 True
508 >>> roundtrip("\\xef\\xbf\\xbd")
509 True
510 >>> roundtrip("\\xef\\xef\\xbf\\xbd")
505 True
511 True
506 '''
512 '''
507
513
General Comments 0
You need to be logged in to leave comments. Login now