summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2019-01-07 19:28:56 -0600
committerptmcg <ptmcg@austin.rr.com>2019-01-07 19:28:56 -0600
commit898a4b89df51d4ce3a102ec3a823227f44552178 (patch)
treebfc3437188872a503bc18a464f1b272ccdb59841
parente29bb653ee93e09ad8bdf2e28ce3236105795b68 (diff)
downloadpyparsing-git-898a4b89df51d4ce3a102ec3a823227f44552178.tar.gz
Unit test to test fix for issue #65
-rw-r--r--unitTests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/unitTests.py b/unitTests.py
index 6a7eb20..7d2c1ca 100644
--- a/unitTests.py
+++ b/unitTests.py
@@ -3924,6 +3924,20 @@ class ExplainExceptionTest(ParseTestCase):
raise
+class CaselessKeywordVsKeywordCaselessTest(ParseTestCase):
+ def runTest(self):
+ import pyparsing as pp
+
+ frule = pp.Keyword('t', caseless=True) + pp.Keyword('yes', caseless=True)
+ crule = pp.CaselessKeyword('t') + pp.CaselessKeyword('yes')
+
+ flist = frule.searchString('not yes').asList()
+ print_(flist)
+ clist = crule.searchString('not yes').asList()
+ print_(clist)
+ self.assertEqual(flist, clist, "CaselessKeyword not working the same as Keyword(caseless=True)")
+
+
class MiscellaneousParserTests(ParseTestCase):
def runTest(self):