dfilter: Add more tests

Add more tests and fix a copy paste error with the test name.
This commit is contained in:
João Valverde 2022-02-23 20:17:07 +00:00 committed by A Wireshark GitLab Utility
parent 90c0862a93
commit 49566a5b0c
1 changed files with 13 additions and 1 deletions

View File

@ -120,6 +120,18 @@ class case_syntax(unittest.TestCase):
class case_equality(unittest.TestCase):
trace_file = "sip.pcapng"
def test_charconst_lhs(self, checkDFilterCount):
def test_all_eq_1(self, checkDFilterCount):
dfilter = "udp.port === 5060"
checkDFilterCount(dfilter, 2)
def test_any_ne_1(self, checkDFilterCount):
dfilter = "udp.port !== 5060"
checkDFilterCount(dfilter, 4)
def test_any_eq_1(self, checkDFilterCount):
dfilter = "udp.port == 5060"
checkDFilterCount(dfilter, 5)
def test_all_ne_1(self, checkDFilterCount):
dfilter = "udp.port != 5060"
checkDFilterCount(dfilter, 1)