Skip to content

Commit

Permalink
Add Unicode support
Browse files Browse the repository at this point in the history
This addresses items 1 and 2 of issue lyda#16.
  • Loading branch information
myint committed Jun 9, 2013
1 parent a134538 commit a5894e1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions misspellings_lib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-

"""Misspellings module.
Take a list of files, check them against a list of misspelled words.
Expand Down Expand Up @@ -1858,6 +1860,7 @@ def dump_misspelling_list(self):
'garantee': ['guarantee'],
'garanteed': ['guaranteed'],
'garantees': ['guarantees'],
'gardai': ['gardaí'],
'garnison': ['garrison'],
'gaurantee': ['guarantee'],
'gauranteed': ['guaranteed'],
Expand Down
1 change: 1 addition & 0 deletions tests/example_msl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,7 @@ ganster gangster
garantee guarantee
garanteed guaranteed
garantees guarantees
gardai gardaí
garnison garrison
gaurantee guarantee
gauranteed guaranteed
Expand Down
2 changes: 1 addition & 1 deletion tests/test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def testMoreComplexFile(self):
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):
Expand Down
1 change: 1 addition & 0 deletions tests/various_spellings.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ good
teh good zeebra named "Rockerfeller"
we ignore lower rockerfeller on purpose
Now is the time to withdrawl
gardai
2 changes: 2 additions & 0 deletions tests/various_spellings.good_out
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ sed "4s/Rockerfeller/Rockefeller/" "various_spellings.c" > "various_spellings.c,
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"

0 comments on commit a5894e1

Please sign in to comment.