aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite_dfilter
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-09-21 18:38:47 +0100
committerJoão Valverde <j@v6e.pt>2023-09-22 12:19:55 +0000
commit78547a149f6cf5f26eb18c26964804f1fa7a4a1b (patch)
tree90c95a3065de3daa2e9713b0fad380111c7a70c0 /test/suite_dfilter
parentfad2c1e3be0dcf43674858cd662e47ec84789395 (diff)
Make tfs_true_false the default for booleans
Instead of adding a TFS(&tfs_true_false) to every boolean field, make it the default if "strings" is NULL. This seems to match the already existing documentation: If the Boolean field is to be displayed as "False" or "True", the 'strings' field would be set to NULL.
Diffstat (limited to 'test/suite_dfilter')
-rw-r--r--test/suite_dfilter/group_syntax.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/suite_dfilter/group_syntax.py b/test/suite_dfilter/group_syntax.py
index 70ea9fb73c..4f6afc03dd 100644
--- a/test/suite_dfilter/group_syntax.py
+++ b/test/suite_dfilter/group_syntax.py
@@ -437,5 +437,26 @@ class TestDfilterTFSValueString:
trace_file = "http.pcap"
def test_tfs_1(self, checkDFilterCount):
+ dfilter = 'ip.flags.df == True'
+ checkDFilterCount(dfilter, 1)
+
+ def test_tfs_2(self, checkDFilterCount):
+ dfilter = 'ip.flags.df == "True"'
+ checkDFilterCount(dfilter, 1)
+
+ def test_tfs_3(self, checkDFilterCount):
dfilter = 'ip.flags.df == "Set"'
checkDFilterCount(dfilter, 1)
+
+ def test_tfs_4(self, checkDFilterCount):
+ dfilter = 'frame.ignored == False'
+ checkDFilterCount(dfilter, 1)
+
+ def test_tfs_5(self, checkDFilterCount):
+ dfilter = 'frame.ignored == "False"'
+ checkDFilterCount(dfilter, 1)
+
+ def test_tfs_6(self, checkDFilterFail):
+ error = 'expected "True" or "False", not "Unset"'
+ dfilter = 'frame.ignored == "Unset"'
+ checkDFilterFail(dfilter, error)