diff options
author | ptmcg <ptmcg@austin.rr.com> | 2021-10-27 12:57:15 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2021-10-27 12:57:15 -0500 |
commit | 1bbc83267f33471f25b885c5376b65316a6d1968 (patch) | |
tree | f145c9e8932fc66f51b7f7c6989a527601b52a8a /tests | |
parent | 46f4af6fee9b4dc6b7c10f27ed9a755a45082377 (diff) | |
download | pyparsing-git-1bbc83267f33471f25b885c5376b65316a6d1968.tar.gz |
Fix whitespace skipping bug introduced while reverting LineStart() changes - Issue #319
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_unit.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py index 0a95400..f90e42a 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -3617,16 +3617,19 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): def testLineStartWithLeadingSpaces(self): # testing issue #272 + # reverted in 3.0.2 - LineStart() + expr will match expr even if there + # are leading spaces. To force "only at column 1" matching, use + # AtLineStart(expr). instring = dedent( """ - a - b - c - d - e - f - g - """ + a + b + c + d + e + f + g + """ ) print(pp.testing.with_line_numbers(instring)) @@ -7711,10 +7714,10 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): Match leading_a at loc 1(1,2) aba ^ - *Match A at loc 1(1,2) + Match A at loc 1(1,2) aba ^ - *Match A failed, ParseException raised: Expected A, found 'ba' (at char 1), (line:1, col:2) + Match A failed, ParseException raised: Expected A, found 'ba' (at char 1), (line:1, col:2) Match leading_a failed, ParseException raised: Expected A, found 'ba' (at char 1), (line:1, col:2) *Match B at loc 1(1,2) aba |