##// END OF EJS Templates
doctest: replace chr() with pycompat.bytechr()
Yuya Nishihara -
r34135:708b5530 default
parent child Browse files
Show More
@@ -27,6 +27,7 b' from . import ('
27 27
28 28 def _string_escape(text):
29 29 """
30 >>> from .pycompat import bytechr as chr
30 31 >>> d = {b'nl': chr(10), b'bs': chr(92), b'cr': chr(13), b'nul': chr(0)}
31 32 >>> s = b"ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d
32 33 >>> s
@@ -41,6 +42,7 b' def _string_escape(text):'
41 42
42 43 def decodeextra(text):
43 44 """
45 >>> from .pycompat import bytechr as chr
44 46 >>> sorted(decodeextra(encodeextra({b'foo': b'bar', b'baz': chr(0) + b'2'})
45 47 ... ).items())
46 48 [('baz', '\\x002'), ('branch', 'default'), ('foo', 'bar')]
General Comments 0
You need to be logged in to leave comments. Login now