-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemantic_test_to_fix.py
158 lines (106 loc) · 4.5 KB
/
semantic_test_to_fix.py
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
# -*- coding: utf-8 -*-
import unittest
from probe import hayaku_extract
class SematicAbbrTests(unittest.TestCase):
def test_0(self):
self.assertEqual(hayaku_extract('fs'), 'font-size')
def test_1(self):
self.assertEqual(hayaku_extract('fst'), 'font-style')
def test_2(self):
self.assertEqual(hayaku_extract('w1'), 'width: 1px')
def test_3(self):
self.assertEqual(hayaku_extract('w1p'), 'width: 1px')
def test_4(self):
self.assertEqual(hayaku_extract('w1px'), 'width: 1px')
def test_5(self):
self.assertEqual(hayaku_extract('w1.1'), 'width: 1.1em')
def test_6(self):
self.assertEqual(hayaku_extract('w.1'), 'width: .1em')
def test_7(self):
self.assertEqual(hayaku_extract('w1.0'), 'width: 1em')
def test_8(self):
self.assertEqual(hayaku_extract('w1.'), 'width: 1em')
def test_9(self):
self.assertEqual(hayaku_extract('w1e'), 'width: 1em')
def test_10(self):
self.assertEqual(hayaku_extract('m-1'), 'margin: -1px')
def test_11(self):
self.assertEqual(hayaku_extract('m-.1'), 'margin: -.1em')
def test_12(self):
self.assertEqual(hayaku_extract('m0'), 'margin: 0')
def test_13(self):
self.assertEqual(hayaku_extract('m0.0'), 'margin: 0')
def test_14(self):
self.assertEqual(hayaku_extract('m-0.0'), 'margin: 0')
def test_15(self):
self.assertEqual(hayaku_extract('h1.100'), 'height: 1.1em')
def test_16(self):
self.assertEqual(hayaku_extract('p1m'), 'padding: 1mm')
def test_17(self):
self.assertEqual(hayaku_extract('p1%'), 'padding: 1%')
def test_18(self):
self.assertEqual(hayaku_extract('p.23pe'), 'padding: .23%')
def test_19(self):
self.assertEqual(hayaku_extract('p2.p'), 'padding: 2px')
def test_20(self):
self.assertEqual(hayaku_extract('p2.3p'), 'padding: 2.3px')
def test_21(self):
self.assertEqual(hayaku_extract('p3x'), 'padding: 3ex')
def test_22(self):
self.assertEqual(hayaku_extract('p3w'), 'padding: 3vw')
def test_23(self):
self.assertEqual(hayaku_extract('p3h'), 'padding: 3vh')
def test_24(self):
self.assertEqual(hayaku_extract('p3c'), 'padding: 3ch')
def test_25(self):
self.assertEqual(hayaku_extract('p3r'), 'padding: 3rem')
def test_26(self):
self.assertEqual(hayaku_extract('p3i'), 'padding: 3in')
def test_27(self):
self.assertEqual(hayaku_extract('p3t'), 'padding: 3pt')
def test_28(self):
self.assertEqual(hayaku_extract('b2'), 'bottom: 2px')
def test_29(self):
self.assertEqual(hayaku_extract('bd2'), 'border: 2px')
def test_30(self):
self.assertEqual(hayaku_extract('bw'), 'border-width: 2px')
def test_31(self):
self.assertEqual(hayaku_extract('blw'), 'border-left-width: 2px')
def test_32(self):
self.assertEqual(hayaku_extract('bdF'), 'border: #FFF')
def test_33(self):
self.assertEqual(hayaku_extract('bdF'), 'border: #FFF')
def test_34(self):
self.assertEqual(hayaku_extract('bd#0'), 'border: #000')
def test_35(self):
self.assertEqual(hayaku_extract('baF'), 'background: #FFF')
def test_36(self):
self.assertEqual(hayaku_extract('ba#f'), 'background: #FFF')
def test_37(self):
self.assertEqual(hayaku_extract('ba3'), 'background: #333')
def test_38(self):
self.assertEqual(hayaku_extract('ba3p'), 'background: 3px')
def test_39(self):
self.assertEqual(hayaku_extract('c00'), 'color: #000')
def test_40(self):
self.assertEqual(hayaku_extract('c02'), 'color: #000')
def test_41(self):
self.assertEqual(hayaku_extract('z1'), 'zoom: 1')
def test_42(self):
self.assertEqual(hayaku_extract('zi1'), 'z-index: 1')
def test_43(self):
self.assertEqual(hayaku_extract('zi-4'), 'z-index: -4')
def test_44(self):
self.assertEqual(hayaku_extract('fs4'), 'font-size: 4px')
def test_issue_83_1(self):
self.assertEqual(hayaku_extract('co'), 'color')
def test_issue_83_2(self):
self.assertEqual(hayaku_extract('con'), 'content')
def test_issue_83_3(self):
self.assertEqual(hayaku_extract('conn'), 'content: normal;')
def test_issue_76_1(self):
self.assertEqual(hayaku_extract('text-decoration'), 'text-decoration')
def test_issue_76_2(self):
self.assertEqual(hayaku_extract('border'), 'border')
if __name__ == '__main__':
unittest.main()