Fixed bogus word merge in english

Also, added a first unit test. Gotta start somewhere.

Fixes #8.
This commit is contained in:
Virgil Dupras committed 2014-03-14 10:25:25 -04:00
1 parent f5db0adfe3
commit b1b5803c20
4 files changed
+25 -1

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ class Num2Word_EN(lang_EU.Num2Word_EU):
def merge(self, (ltext, lnum), (rtext, rnum)):
if lnum == 1 and rnum < 100:
return (rtext, rnum + lnum)
return (rtext, rnum)
elif 100 > lnum > rnum :
return ("%s-%s"%(ltext, rtext), lnum + rnum)
elif lnum >= 100 > rnum: