Commits

Steven Myint committed 4412b7b

Add Unicode support

This addresses items 1 and 2 of issue #16.

Comments (0)

Files changed (5)

misspellings_lib.py

+# -*- coding: utf-8 -*-
+
 """Misspellings module.
 
    Take a list of files, check them against a list of misspelled words.
     'garantee': ['guarantee'],
     'garanteed': ['guaranteed'],
     'garantees': ['guarantees'],
+    'gardai': ['gardaí'],
     'garnison': ['garrison'],
     'gaurantee': ['guarantee'],
     'gauranteed': ['guaranteed'],

tests/example_msl.txt

 garantee guarantee
 garanteed guaranteed
 garantees guarantees
+gardai gardaí
 garnison garrison
 gaurantee guarantee
 gauranteed guaranteed

tests/test_class.py

       os.path.join(BASE_PATH, 'various_spellings.c')])
     errors, results = ms.check()
     self.assertEqual(len(errors), 0)
-    self.assertEqual(len(results), 6)
+    self.assertEqual(len(results), 7)
 
 
 class UtilityFunctionTestCase(unittest.TestCase):

tests/various_spellings.c

 teh good zeebra named "Rockerfeller"
 we ignore lower rockerfeller on purpose
 Now is the time to withdrawl
+gardai

tests/various_spellings.good_out

 mv "various_spellings.c," "various_spellings.c"
 sed "6s/withdrawl/withdraw/" "various_spellings.c" > "various_spellings.c,"
 mv "various_spellings.c," "various_spellings.c"
+sed "7s/gardai/gardaí/" "various_spellings.c" > "various_spellings.c,"
+mv "various_spellings.c," "various_spellings.c"