mirror of
https://github.com/mrkkrp/megaparsec.git
synced 2024-11-23 19:38:05 +03:00
fix failing tests for ‘sepEndBy’ and ‘sepEndBy1’
This commit is contained in:
parent
8dce9cdc5d
commit
84223f2947
@ -187,7 +187,7 @@ prop_sepEndBy n' c' = checkParser p r s
|
||||
p = sepEndBy (char 'a') (char '-')
|
||||
a = Right $ replicate n 'a'
|
||||
r | isNothing c' = a
|
||||
| c == 'a' && n == 0 = a
|
||||
| c == 'a' && n == 0 = Right "a"
|
||||
| n == 0 = posErr 0 s [uneCh c, exCh 'a', exEof]
|
||||
| c == '-' = a
|
||||
| otherwise = posErr (g n) s [uneCh c, exCh '-', exEof]
|
||||
@ -201,7 +201,7 @@ prop_sepEndBy1 n' c' = checkParser p r s
|
||||
a = Right $ replicate n 'a'
|
||||
r | isNothing c' && n >= 1 = a
|
||||
| isNothing c' = posErr 0 s [uneEof, exCh 'a']
|
||||
| c == 'a' && n == 0 = a
|
||||
| c == 'a' && n == 0 = Right "a"
|
||||
| n == 0 = posErr 0 s [uneCh c, exCh 'a']
|
||||
| c == '-' = a
|
||||
| otherwise = posErr (g n) s [uneCh c, exCh '-', exEof]
|
||||
|
Loading…
Reference in New Issue
Block a user