From e4874aeab0f447d777d54ef4fcdc263f5f80ae21 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 21 Sep 2001 15:36:41 +0000 Subject: [PATCH] Test basic functioning of unicode repr(). (If this breaks Jython, please let me know and we'll figure out how to fix the test.) --- Lib/test/test_unicode.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index d508bef7574..0748dc77c0d 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)),