Kaydet (Commit) ef0a0328 authored tarafından Marc-André Lemburg's avatar Marc-André Lemburg

Patch by Finn Bock to make test_unicode.py work for Jython.

üst 9ae2148a
......@@ -261,7 +261,8 @@ test('islower', u'abc\n', 1)
test('isupper', u'a', 0)
test('isupper', u'A', 1)
test('isupper', u'\n', 0)
test('isupper', u'\u1FFc', 0)
if sys.platform[:4] != 'java':
test('isupper', u'\u1FFc', 0)
test('isupper', u'ABC', 1)
test('isupper', u'AbC', 0)
test('isupper', u'ABC\n', 1)
......@@ -339,13 +340,17 @@ verify(u"%c" % (u"a",) == u'a')
verify(u"%c" % ("a",) == u'a')
verify(u"%c" % (34,) == u'"')
verify(u"%c" % (36,) == u'$')
value = u"%r, %r" % (u"abc", "abc")
if value != u"u'abc', 'abc'":
print '*** formatting failed for "%s"' % 'u"%r, %r" % (u"abc", "abc")'
if sys.platform[:4] != 'java':
value = u"%r, %r" % (u"abc", "abc")
if value != u"u'abc', 'abc'":
print '*** formatting failed for "%s"' % 'u"%r, %r" % (u"abc", "abc")'
verify(u"%(x)s, %(y)s" % {'x':u"abc", 'y':"def"} == u'abc, def')
try:
value = u"%(x)s, %()s" % {'x':u"abc", u''.encode('utf-8'):"def"}
if sys.platform[:4] != 'java':
value = u"%(x)s, %()s" % {'x':u"abc", u''.encode('utf-8'):"def"}
else:
value = u"%(x)s, %()s" % {'x':u"abc", u'':"def"}
except KeyError:
print '*** formatting failed for "%s"' % "u'abc, def'"
else:
......
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