diff options
author | Guido van Rossum <guido@python.org> | 2001-09-21 15:36:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-21 15:36:41 (GMT) |
commit | e4874aeab0f447d777d54ef4fcdc263f5f80ae21 (patch) | |
tree | 1fe4db1c372d2d703b4fb3dd413520a4249f7e55 /Lib | |
parent | 8b9cc7e69e179a9178bf8183497c3734bfa589e0 (diff) | |
download | cpython-e4874aeab0f447d777d54ef4fcdc263f5f80ae21.zip cpython-e4874aeab0f447d777d54ef4fcdc263f5f80ae21.tar.gz cpython-e4874aeab0f447d777d54ef4fcdc263f5f80ae21.tar.bz2 |
Test basic functioning of unicode repr(). (If this breaks Jython,
please let me know and we'll figure out how to fix the test.)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_unicode.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index d508bef..0748dc7 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -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)), |