summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-05-09 19:57:46 (GMT)
committerFred Drake <fdrake@acm.org>2000-05-09 19:57:46 (GMT)
commit774c931c121e6ab2e822034a222001fdb788361c (patch)
tree510236d90cdab3ac6f2adc2f94c3a56cf33da31e
parent8b4d01d9f93068ec08abf62f5307d9391fe6740a (diff)
downloadcpython-774c931c121e6ab2e822034a222001fdb788361c.zip
cpython-774c931c121e6ab2e822034a222001fdb788361c.tar.gz
cpython-774c931c121e6ab2e822034a222001fdb788361c.tar.bz2
M.-A. Lemburg <mal@lemburg.com>:
Added another test for string formatting (the one that produced the core dump now fixed in unicodeobject.c).
-rw-r--r--Lib/test/test_unicode.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 45449ee..fa50f81 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -263,6 +263,12 @@ assert '...%(foo)s...' % {u'foo':u"abc",'def':123} == u'...abc...'
assert '...%(foo)s...' % {u'foo':u"abc",u'def':123} == u'...abc...'
assert '...%s...%s...%s...%s...' % (1,2,3,u"abc") == u'...1...2...3...abc...'
assert '...%s...' % u"abc" == u'...abc...'
+try:
+ '...%s...äöü...' % u"abc"
+except ValueError:
+ pass
+else:
+ raise AssertionError, "'...%s...äöü...' % u'abc' failed to raise an exception"
print 'done.'
# Test builtin codecs