diff options
author | Jay Pedersen <jayped007@yahoo.com> | 2020-05-22 23:25:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 23:25:10 -0500 |
commit | 6f3b5f0f75f019a5d030872babe4e585a6bd942b (patch) | |
tree | deb98b2e020141213a8cc55409fd46bc73e4df3b /examples | |
parent | d0d38c12f91ccf0b8cb4caa69b7846860451139b (diff) | |
download | pyparsing-git-6f3b5f0f75f019a5d030872babe4e585a6bd942b.tar.gz |
makeRomanNumeral bug fix, added MMMMM test (#216)
Co-authored-by: jay <jayped007@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/romanNumerals.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/romanNumerals.py b/examples/romanNumerals.py index 932daa6..9ed4c92 100644 --- a/examples/romanNumerals.py +++ b/examples/romanNumerals.py @@ -45,7 +45,7 @@ romanNumeral = numeral[1, ...].setParseAction(sum) # unit tests def makeRomanNumeral(n): def addDigits(n, limit, c, s): - while n > limit: + while n >= limit: n -= limit s += c return n, s @@ -95,6 +95,7 @@ romanNumeral.runTests( XIX MCMLXXX MMVI + MMMMM """, fullDump=False, postParse=verify_value, |