summaryrefslogtreecommitdiff
path: root/unitTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'unitTests.py')
-rw-r--r--unitTests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/unitTests.py b/unitTests.py
index a31bf40..a165e39 100644
--- a/unitTests.py
+++ b/unitTests.py
@@ -985,6 +985,14 @@ class SkipToParserTests(ParseTestCase):
tryToParse('some text /* comment with ; in */; working')
tryToParse('some text /* comment with ; in */some other stuff; working', fail_expected=True)
+ # test that we correctly create named results
+ text = "prefixDATAsuffix"
+ data = Literal("DATA")
+ suffix = Literal("suffix")
+ expr = SkipTo(data + suffix)('prefix') + data + suffix
+ result = expr.parseString(text)
+ assert isinstance(result.prefix, str), "SkipTo created with wrong saveAsList attribute"
+
class CustomQuotesTest(ParseTestCase):
def runTest(self):
from pyparsing import QuotedString