diff options
author | João Valverde <j@v6e.pt> | 2022-02-20 00:14:24 +0000 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-03-05 11:10:54 +0000 |
commit | a68b408a9f761e5c8bf86867a80792e0417da019 (patch) | |
tree | 256d8e0c80380df6d1baae07ca7eabceca6c62bc /test | |
parent | c4f9d8abda53c86e87cb5152616a53249f0b97df (diff) |
dfilter: Add RHS bias for literal values
For unparsed values on the RHS of a comparison try
to parse them first as a literal and only then as
a protocol. This is more complicated in code but
should be a use case a lot more common and useful in
practice.
It removes some annoying special cases and applies this
rule consistently to any expression. Consistency is
important otherwise the special cases and exceptions
make the language confusing and difficult to learn.
For values on the LHS the rule remains to first try a
protocol value, then a literal.
Related with issue #17731.
Diffstat (limited to 'test')
-rw-r--r-- | test/suite_dfilter/group_range_method.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/suite_dfilter/group_range_method.py b/test/suite_dfilter/group_range_method.py index e0776fda46..62328bb19b 100644 --- a/test/suite_dfilter/group_range_method.py +++ b/test/suite_dfilter/group_range_method.py @@ -37,11 +37,11 @@ class case_range(unittest.TestCase): def test_slice_string_1(self, checkDFilterFail): dfilter = "frame == \"00\"[1]" - checkDFilterFail(dfilter, "Range is not supported for entity \"00\" of type STRING") + checkDFilterFail(dfilter, "Range is not supported for entity \"00\"") def test_slice_unparsed_1(self, checkDFilterFail): dfilter = "a == b[1]" - checkDFilterFail(dfilter, "Range is not supported for entity \"b\" of type LITERAL") + checkDFilterFail(dfilter, "Range is not supported for entity \"b\"") def test_slice_func_1(self, checkDFilterSucceed): dfilter = "string(ipx.src.node)[3:2] == \"cc:dd\"" |