summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaz Solc <tomaz.solc@tablix.org>2010-10-12 09:15:29 +0200
committerTomaz Solc <tomaz.solc@tablix.org>2010-10-12 09:15:29 +0200
commitfe6fa063d6eb39f9102fef5f907105b8cfe9bac6 (patch)
tree031c052199703472a9781d531083183700322fd1
parenta29c3d42dbbacbce75fcc3b03ffe4639dc93e659 (diff)
downloadunidecode-fe6fa063d6eb39f9102fef5f907105b8cfe9bac6.tar.gz
Added tests for missing and short tables.
-rw-r--r--tests/basic_2.py14
-rw-r--r--tests/basic_3.py12
2 files changed, 25 insertions, 1 deletions
diff --git a/tests/basic_2.py b/tests/basic_2.py
index 2481064..02b1aca 100644
--- a/tests/basic_2.py
+++ b/tests/basic_2.py
@@ -41,10 +41,22 @@ class TestUnidecode(unittest.TestCase):
(u"Efficient",
"Efficient"),
+
+ # Table that doesn't exist
+ (u'\ua500',
+ ''),
+
+ # Table that has less than 256 entriees
+ (u'\u1eff',
+ ''),
+
+ # Non-BMP character
+ (u'\U0001d5a0',
+ ''),
]
for input, output in TESTS:
self.failUnlessEqual(unidecode(input), output)
if __name__ == "__main__":
- unittest.main() \ No newline at end of file
+ unittest.main()
diff --git a/tests/basic_3.py b/tests/basic_3.py
index 3d039a3..1148575 100644
--- a/tests/basic_3.py
+++ b/tests/basic_3.py
@@ -41,6 +41,18 @@ class TestUnidecode(unittest.TestCase):
("Efficient",
"Efficient"),
+
+ # Table that doesn't exist
+ ('\ua500',
+ ''),
+
+ # Table that has less than 256 entriees
+ ('\u1eff',
+ ''),
+
+ # Non-BMP character
+ ('\U0001d5a0',
+ ''),
]
for input, output in TESTS: