Test: Add UTF-8 filter tests.
Change-Id: Ic1e961802e716b5c446428efa068a6205faab954 Reviewed-on: https://code.wireshark.org/review/27912 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
a5d3079b07
commit
55304159fc
|
@ -158,6 +158,14 @@ class case_tshark_name_resolution_clopts(subprocesstest.SubprocessTestCase):
|
|||
|
||||
# XXX Add invalid name resolution.
|
||||
|
||||
class case_tshark_unicode_clopts(subprocesstest.SubprocessTestCase):
|
||||
def test_tshark_unicode_display_filter(self):
|
||||
'''Unicode (UTF-8) display filter'''
|
||||
cap_file = os.path.join(config.capture_dir, 'http.pcap')
|
||||
self.runProcess((config.cmd_tshark, '-r', cap_file, '-Y', 'tcp.flags.str == "·······AP···"'))
|
||||
self.assertTrue(self.grepOutput('HEAD.*/v4/iuident.cab'))
|
||||
|
||||
|
||||
class case_tshark_dump_glossaries(subprocesstest.SubprocessTestCase):
|
||||
def test_tshark_dump_glossary(self):
|
||||
for glossary in glossaries:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -162,3 +163,11 @@ class case_string(dfiltertest.DFTestCase):
|
|||
def test_string_len(self):
|
||||
dfilter = 'len(http.request.method) == 4'
|
||||
self.assertDFilterCount(dfilter, 1)
|
||||
|
||||
def test_eq_unicode(self):
|
||||
dfilter = 'tcp.flags.str == "·······AP···"'
|
||||
self.assertDFilterCount(dfilter, 1)
|
||||
|
||||
def test_contains_unicode(self):
|
||||
dfilter = 'tcp.flags.str contains "·······AP···"'
|
||||
self.assertDFilterCount(dfilter, 1)
|
||||
|
|
Loading…
Reference in New Issue