summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2021-11-09 10:01:05 -0600
committerptmcg <ptmcg@austin.rr.com>2021-11-09 10:01:05 -0600
commit29415662d238c1bde58a70f60c7e946a2c8b1710 (patch)
treef5e04f1d5622097ca950a9ff2de12b771539e408 /tests
parent8cb3e1f8dc2eb104a87ee9ae5ee9c336a7c3ecda (diff)
downloadpyparsing-git-29415662d238c1bde58a70f60c7e946a2c8b1710.tar.gz
Fix delimitedList regression when called with a literal string instead of a ParserElement (Issue #331)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_unit.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py
index db1c8e0..a9d6a14 100644
--- a/tests/test_unit.py
+++ b/tests/test_unit.py
@@ -7709,6 +7709,12 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
print(bool_list2)
self.assertEqual("bool [, bool]...", str(bool_list2))
+ def testDelimitedListOfStrLiterals(self):
+ expr = pp.delimitedList("ABC")
+ print(str(expr))
+ source = "ABC, ABC,ABC"
+ self.assertParseAndCheckList(expr, source, [s.strip() for s in source.split(",")])
+
def testEnableDebugOnNamedExpressions(self):
"""
- enable_debug_on_named_expressions - flag to auto-enable debug on all subsequent