Test: Add wslua.
[metze/wireshark/wip.git] / test / suite_unittests.py
1 #
2 # -*- coding: utf-8 -*-
3 # Wireshark tests
4 # By Gerald Combs <gerald@wireshark.org>
5 #
6 # Ported from a set of Bash scripts which were copyright 2005 Ulf Lamping
7 #
8 # SPDX-License-Identifier: GPL-2.0-or-later
9 #
10 '''EPAN unit tests'''
11
12 import config
13 import os.path
14 import subprocesstest
15 import sys
16 import unittest
17
18 class case_unittests(subprocesstest.SubprocessTestCase):
19     def test_unit_exntest(self):
20         '''exntest'''
21         self.assertRun(os.path.join(config.program_path, 'exntest'))
22
23     def test_unit_oids_test(self):
24         '''oids_test'''
25         self.assertRun(os.path.join(config.program_path, 'oids_test'))
26
27     def test_unit_reassemble_test(self):
28         '''reassemble_test'''
29         self.assertRun(os.path.join(config.program_path, 'reassemble_test'))
30
31     def test_unit_tvbtest(self):
32         '''tvbtest'''
33         self.assertRun(os.path.join(config.program_path, 'tvbtest'))
34
35     def test_unit_wmem_test(self):
36         '''wmem_test'''
37         self.assertRun((os.path.join(config.program_path, 'wmem_test'),
38             '--verbose'
39         ))
40
41     def test_unit_wmem_test(self):
42         '''wmem_test'''
43         self.assertRun((os.path.join(config.program_path, 'wmem_test'),
44             '--verbose'
45         ))
46
47     def test_unit_ftsanity(self):
48         '''ftsanity.py'''
49         fts_cmd = [
50             os.path.join(config.tools_dir, 'ftsanity.py'),
51             config.cmd_tshark
52         ]
53         if sys.executable:
54             fts_cmd.insert(0, sys.executable)
55         self.assertRun(fts_cmd)
56
57     def test_unit_fieldcount(self):
58         '''fieldcount'''
59         self.assertRun((config.cmd_tshark, '-G', 'fieldcount'))