diff options
author | Guido van Rossum <guido@python.org> | 2000-03-13 23:21:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-03-13 23:21:48 (GMT) |
commit | d4d26842407b478c63d40bb77d83ca7f2dd68de8 (patch) | |
tree | f843427aad3dabeb5f92ab2f3d65cecacacb0028 /Lib/test/test_unicode.py | |
parent | ee70ad1e527e67232c61cf47819a0fc264eca435 (diff) | |
download | cpython-d4d26842407b478c63d40bb77d83ca7f2dd68de8.zip cpython-d4d26842407b478c63d40bb77d83ca7f2dd68de8.tar.gz cpython-d4d26842407b478c63d40bb77d83ca7f2dd68de8.tar.bz2 |
Marc-Andre Lemburg: Add tests for mixed use of char in string.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index b994fb2..64b8ff8 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -219,6 +219,19 @@ test('translate', u"abababc", u'bbbc', {ord('a'):None}) test('translate', u"abababc", u'iiic', {ord('a'):None, ord('b'):ord('i')}) test('translate', u"abababc", u'iiix', {ord('a'):None, ord('b'):ord('i'), ord('c'):u'x'}) +# Contains: +print 'Testing Unicode contains method...', +assert ('a' in 'abdb') == 1 +assert ('a' in 'bdab') == 1 +assert ('a' in 'bdaba') == 1 +assert ('a' in 'bdba') == 1 +assert ('a' in u'bdba') == 1 +assert (u'a' in u'bdba') == 1 +assert (u'a' in u'bdb') == 0 +assert (u'a' in 'bdb') == 0 +assert (u'a' in 'bdba') == 1 +print 'done.' + # Formatting: print 'Testing Unicode formatting strings...', assert u"%s, %s" % (u"abc", "abc") == u'abc, abc' |