From b6ca26833caeaede52e13bcf6ebd0e2015a2d753 Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Tue, 12 Oct 2010 09:20:39 +0200 Subject: Check if any character in the BMP range makes it throw an exception. --- tests/basic_2.py | 6 ++++++ tests/basic_3.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/basic_2.py b/tests/basic_2.py index 02b1aca..acca30c 100644 --- a/tests/basic_2.py +++ b/tests/basic_2.py @@ -9,6 +9,12 @@ class TestUnidecode(unittest.TestCase): self.failUnlessEqual(unidecode(t), t) + def test_bmp(self): + for n in xrange(0,0x10000): + # Just check that it doesn't throw an exception + t = unichr(n) + unidecode(t) + def test_specific(self): TESTS = [ diff --git a/tests/basic_3.py b/tests/basic_3.py index 1148575..19d358d 100644 --- a/tests/basic_3.py +++ b/tests/basic_3.py @@ -9,6 +9,12 @@ class TestUnidecode(unittest.TestCase): self.failUnlessEqual(unidecode(t), t) + def test_bmp(self): + for n in range(0,0x10000): + # Just check that it doesn't throw an exception + t = unichr(n) + unidecode(t) + def test_specific(self): TESTS = [ -- cgit v1.2.1