diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-04-22 11:24:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-04-22 11:24:50 (GMT) |
commit | 9b05700ed3e395a87398bfd878bd92e65f682bce (patch) | |
tree | a176a157cfad0661bf8be34dbd128a075ec57e74 /Lib | |
parent | d0ab48f1c4bb5cbe96a799f9271f36c51c3debd3 (diff) | |
download | cpython-9b05700ed3e395a87398bfd878bd92e65f682bce.zip cpython-9b05700ed3e395a87398bfd878bd92e65f682bce.tar.gz cpython-9b05700ed3e395a87398bfd878bd92e65f682bce.tar.bz2 |
Merged revisions 80349 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r80349 | victor.stinner | 2010-04-22 13:23:23 +0200 (jeu., 22 avril 2010) | 3 lines
Issue #8195: Fix a crash in sqlite Connection.create_collation() if the
collation name contains a surrogate character.
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/sqlite3/test/regression.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index da44551..5e315fa 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -183,6 +183,13 @@ class RegressionTests(unittest.TestCase): """ self.assertRaises(sqlite.Warning, self.con, 1) + def CheckCollation(self): + def collation_cb(a, b): + return 1 + self.assertRaises(sqlite.ProgrammingError, self.con.create_collation, + # Lone surrogate cannot be encoded to the default encoding (utf8) + "\uDC80", collation_cb) + def suite(): regression_suite = unittest.makeSuite(RegressionTests, "Check") return unittest.TestSuite((regression_suite,)) |