Fixed bogus word merge in english

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

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

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: