diff options
author | Bob Ippolito <bob@redivi.com> | 2008-03-23 08:54:28 +0000 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2008-03-23 08:54:28 +0000 |
commit | 95dd20b6b733197d8a0443af9fc277d7a31eb335 (patch) | |
tree | dba16ebfcc06c73c632be5363619397cf394cdcd | |
parent | 16fa400f522f63098842728fffc2439456b7f117 (diff) | |
download | simplejson-95dd20b6b733197d8a0443af9fc277d7a31eb335.tar.gz |
failing big unicode test
git-svn-id: http://simplejson.googlecode.com/svn/trunk@71 a4795897-2c25-0410-b006-0d3caba88fa1
-rw-r--r-- | simplejson/tests/test_unicode.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/simplejson/tests/test_unicode.py b/simplejson/tests/test_unicode.py index 88d0939..3a41016 100644 --- a/simplejson/tests/test_unicode.py +++ b/simplejson/tests/test_unicode.py @@ -14,3 +14,13 @@ def test_encoding2(): ju = S.dumps(u, encoding='utf-8') js = S.dumps(s, encoding='utf-8') assert ju == js + +def test_big_unicode_encode(): + u = u'\U0001d120' + assert S.dumps(u) == '"\\ud834\\udd20"' + assert S.dumps(u, ensure_ascii=False) == '"\\ud834\\udd20"' + +def test_big_unicode_decode(): + u = u'\U0001d120' + assert S.loads('"' + u + '"') == u + assert S.loads('"\\ud834\\udd20"') == u |