diff options
author | João Valverde <j@v6e.pt> | 2022-10-25 13:03:08 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-10-31 21:02:39 +0000 |
commit | b83658d8a4137290ed81d9886cc5f3fa7dff1e1c (patch) | |
tree | 255092465361d0fd0d71e700546a4d81680922e3 /test | |
parent | 0853ddd1cb9c94e83bba5ac2608c8de0dc94dae4 (diff) |
dfilter: Add suport for raw addressing with references
Extends raw adressing syntax to wok with references. The syntax
is
@field1 == ${@field2}
This requires replicating the logic to load field references, but
using raw values instead. We use separate hash tables for that,
namely "references" vs "raw_references".
Diffstat (limited to 'test')
-rw-r--r-- | test/suite_dfilter/group_syntax.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/suite_dfilter/group_syntax.py b/test/suite_dfilter/group_syntax.py index c277ba97df..235c57468b 100644 --- a/test/suite_dfilter/group_syntax.py +++ b/test/suite_dfilter/group_syntax.py @@ -348,3 +348,8 @@ class case_raw_modifier(unittest.TestCase): def test_raw2(self, checkDFilterCount): dfilter = '@s7comm.blockinfo.blocktype == 30:fe' checkDFilterCount(dfilter, 1) + + def test_raw_ref(self, checkDFilterCountWithSelectedFrame): + dfilter = '@s7comm.blockinfo.blocktype == ${@s7comm.blockinfo.blocktype}' + # select frame 3, expect 2 frames out of 3. + checkDFilterCountWithSelectedFrame(dfilter, 2, 3) |