summaryrefslogtreecommitdiff
path: root/tests/utf8.py
blob: 6036fa12e436a68ef3b2deb14f8a2ce361f4c374 (plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
import unittest
import base

class Suite(base.Base):
    
    def no_falses(self, name):
        self.start('Utf8/' + name)

        elems = self.driver.find_elements_by_xpath('//pre')

        self.assertNotEqual(0, len(elems))        
        for e in elems:
            self.assertEqual("True", e.text)
    
    def test_1(self):
        """Test case: substring (1)"""
        self.no_falses('substrings')

    def test_2(self):
        """Test case: strlen (2)"""
        self.no_falses('strlens')
        
    def test_3(self):
        """Test case: strlenGe (3)"""
        self.no_falses('strlenGens')

    def test_4(self):
        """Test case: strcat (4)"""
        self.no_falses('strcats')

    def test_5(self):
        """Test case: strsub (5)"""
        self.no_falses('strsubs')

    def test_6(self):
        """Test case: strsuffix (6)"""
        self.no_falses('strsuffixs')

    def test_7(self):
        """Test case: strchr (7)"""
        self.no_falses('strchrs')
        
    def test_8(self):
        """Test case: strindex (8)"""
        self.no_falses('strindexs')

    def test_9(self):
        """Test case: strindex (9)"""
        self.no_falses('strsindexs')

    def test_10(self):
        """Test case: strcspn (10)"""
        self.no_falses('strcspns')

    def test_11(self):
        """Test case: str1 (11)"""
        self.no_falses('str1s')

    def test_12(self):
        """Test case: isalnum (12)"""
        self.no_falses('isalnums')
        
    def test_13(self):
        """Test case: isalpha (13)"""
        self.no_falses('isalphas')
        
    def test_14(self):
        """Test case: isblank (14)"""
        self.no_falses('isblanks')

    def test_15(self):
        """Test case: iscntrl (15)"""
        self.no_falses('iscntrls')

    def test_16(self):
        """Test case: isdigit (16)"""
        self.no_falses('isdigits')
        
    def test_17(self):
        """Test case: isgraph (17)"""
        self.no_falses('isgraphs')
        
    def test_18(self):
        """Test case: islower (18)"""
        self.no_falses('islowers')
        
    def test_19(self):
        """Test case: isprint (19)"""
        self.no_falses('isprints')

    def test_20(self):
        """Test case: ispunct (20)"""
        self.no_falses('ispuncts')

    def test_21(self):
        """Test case: isspace (21)"""
        self.no_falses('isspaces')

    def test_22(self):
        """Test case: isupper (22)"""
        self.no_falses('isuppers')

    def test_23(self):
        """Test case: isxdigit (23)"""
        self.no_falses('isxdigits')

    def test_24(self):
        """Test case: toupper (24)"""
        self.no_falses('touppers')

    def test_25(self):
        """Test case: ord (25)"""
        self.no_falses('ord_and_chrs')

    def test_26 (self):
        """Test case: test_db (26) """
        self.no_falses('test_db')
        
    def full_test (self, name):

        gap = 1000
        i = 0
        while (i + gap < 130000):        
            self.start('Utf8/' + name + '/' + str(i) + '/' + str(i + gap))
            errors = self.body_text()
            self.assertEqual("", errors, errors)
            i = i + gap


    def test_89 (self):
        """Test case: ftTolower """
        self.full_test("ftTolower")

    def test_90 (self):
        """Test case: ftToupper """
        self.full_test("ftToupper")

    def test_91 (self):
        """Test case: ftIsalpha """
        self.full_test("ftIsalpha")

    def test_92 (self):
        """Test case: ftIsdigit """
        self.full_test("ftIsdigit")
    
    def test_93 (self):
        """Test case: ftIsalnum """
        self.full_test("ftIsalnum")

    def test_94 (self):
        """Test case: ftIsspace """
        self.full_test("ftIsspace")

    def test_95 (self):
        """Test case: ftIsblank """
        self.full_test("ftIsblank")
        
    def test_96 (self):
        """Test case: ftIsprint """
        self.full_test("ftIsprint")

    def test_97 (self):
        """Test case: ftIsxdigit """
        self.full_test("ftIsxdigit")

    def test_98 (self):
        """Test case: ftIsupper """
        self.full_test("ftIsupper")
        
    def test_99 (self):
        """Test case: ftIslower """
        self.full_test("ftIslower")
    '''
    '''