File: t40_testdump.py

package info (click to toggle)
recode 3.7.15-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,400 kB
  • sloc: ansic: 73,177; sh: 8,107; python: 3,861; makefile: 198; lisp: 181; lex: 171; sed: 16
file content (61 lines) | stat: -rw-r--r-- 2,020 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
import common
from common import setup_module, teardown_module

# Testing and counting.

# FIXME: In internal, output is produced to stdout, not in the string.

class Test_test7:

    output = '''\
 11  000A LF   117  0020 SP   127  002C ,    152  0030 0     24  0031 1
 24  0032 2     24  0033 3     24  0034 4     24  0035 5     24  0036 6
 24  0037 7      8  0038 8      8  0039 9      8  0041 A      8  0042 B
  8  0043 C      8  0044 D      8  0045 E      8  0046 F    128  0078 x
'''

    def test_1(self):
        common.request('test7..x,us..count')
        common.validate('', self.output)

class Test_test8:

    output = '''\
 22  000A LF   234  0020 SP   255  002C ,    288  0030 0     32  0031 1
 32  0032 2     32  0033 3     32  0034 4     32  0035 5     32  0036 6
 32  0037 7     32  0038 8     32  0039 9     32  0041 A     32  0042 B
 32  0043 C     32  0044 D     32  0045 E     32  0046 F    256  0078 x
'''

    def test_1(self):
        common.request('test8..x,us..count')
        common.validate('', self.output)

class Test_test15:

    output = '''\
 8064  000A LF   56445  0020 SP   64508  002C ,    80765  0030 0
16256  0031 1    16256  0032 2    16256  0033 3    16256  0034 4
16256  0035 5    16256  0036 6    16256  0037 7    16256  0038 8
16256  0039 9    16256  0041 A    16256  0042 B    16000  0043 C
14975  0044 D    15999  0045 E    15990  0046 F    64509  0078 x
'''

    def test_1(self):
        common.request('test15..x2,us..count')
        common.validate('', self.output)

class Test_test16:

    output = '''\
 8192  000A LF   57344  0020 SP   65535  002C ,    81920  0030 0
16384  0031 1    16384  0032 2    16384  0033 3    16384  0034 4
16384  0035 5    16384  0036 6    16384  0037 7    16384  0038 8
16384  0039 9    16384  0041 A    16384  0042 B    16384  0043 C
16384  0044 D    16384  0045 E    16384  0046 F    65536  0078 x
'''

    def test_1(self):
        common.request('test16..x2,us..count')
        common.validate('', self.output)