diff options
author | ptmcg <ptmcg@austin.rr.com> | 2019-01-07 19:28:56 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2019-01-07 19:28:56 -0600 |
commit | 898a4b89df51d4ce3a102ec3a823227f44552178 (patch) | |
tree | bfc3437188872a503bc18a464f1b272ccdb59841 | |
parent | e29bb653ee93e09ad8bdf2e28ce3236105795b68 (diff) | |
download | pyparsing-git-898a4b89df51d4ce3a102ec3a823227f44552178.tar.gz |
Unit test to test fix for issue #65
-rw-r--r-- | unitTests.py | 14 |
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): |