Commit f77d9192 authored by Guido van Rossum's avatar Guido van Rossum

Test basic functioning of unicode repr(). (If this breaks Jython,

please let me know and we'll figure out how to fix the test.)
parent cc26fc59
......@@ -8,6 +8,17 @@ Written by Marc-Andre Lemburg (mal@lemburg.com).
from test_support import verify, verbose, TestFailed
import sys
# Test basic sanity of repr()
verify(repr(u'abc') == "u'abc'")
verify(repr(u'ab\\c') == "u'ab\\\\c'")
verify(repr(u'ab\\') == "u'ab\\\\'")
verify(repr(u'\\c') == "u'\\\\c'")
verify(repr(u'\\') == "u'\\\\'")
verify(repr(u'\n') == "u'\\n'")
verify(repr(u'\r') == "u'\\r'")
verify(repr(u'\t') == "u'\\t'")
verify(repr(u'\b') == "u'\\x08'")
def test(method, input, output, *args):
if verbose:
print '%s.%s%s =? %s... ' % (repr(input), method, args, repr(output)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment