regexp_parser 0.4.13 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +15 -0
- data/lib/regexp_parser/expression.rb +43 -51
- data/lib/regexp_parser/expression/classes/alternation.rb +6 -7
- data/lib/regexp_parser/expression/classes/character_class.rb +11 -0
- data/lib/regexp_parser/expression/classes/conditional.rb +10 -18
- data/lib/regexp_parser/expression/classes/free_space.rb +1 -1
- data/lib/regexp_parser/expression/classes/group.rb +9 -21
- data/lib/regexp_parser/expression/classes/property.rb +2 -2
- data/lib/regexp_parser/expression/classes/set.rb +1 -12
- data/lib/regexp_parser/expression/methods/traverse.rb +1 -1
- data/lib/regexp_parser/expression/quantifier.rb +9 -9
- data/lib/regexp_parser/expression/sequence.rb +5 -4
- data/lib/regexp_parser/expression/subexpression.rb +16 -59
- data/lib/regexp_parser/lexer.rb +31 -27
- data/lib/regexp_parser/parser.rb +179 -179
- data/lib/regexp_parser/scanner.rb +172 -166
- data/lib/regexp_parser/scanner/scanner.rl +44 -38
- data/lib/regexp_parser/syntax.rb +2 -53
- data/lib/regexp_parser/syntax/base.rb +13 -24
- data/lib/regexp_parser/syntax/tokens/character_class.rb +16 -0
- data/lib/regexp_parser/syntax/tokens/unicode_property.rb +26 -26
- data/lib/regexp_parser/syntax/version_lookup.rb +82 -0
- data/lib/regexp_parser/syntax/versions.rb +1 -5
- data/lib/regexp_parser/syntax/versions/1.8.6.rb +30 -0
- data/lib/regexp_parser/syntax/versions/1.9.1.rb +36 -0
- data/lib/regexp_parser/syntax/versions/1.9.3.rb +11 -0
- data/lib/regexp_parser/syntax/versions/2.0.0.rb +20 -0
- data/lib/regexp_parser/syntax/versions/2.2.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.3.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.4.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.4.1.rb +9 -0
- data/lib/regexp_parser/syntax/versions/2.5.0.rb +10 -0
- data/lib/regexp_parser/token.rb +6 -29
- data/lib/regexp_parser/version.rb +1 -1
- data/test/expression/test_strfregexp.rb +7 -0
- data/test/expression/test_to_h.rb +6 -0
- data/test/parser/test_properties.rb +12 -4
- data/test/support/warning_extractor.rb +3 -1
- data/test/syntax/test_all.rb +1 -1
- data/test/syntax/test_syntax.rb +5 -9
- data/test/syntax/{ruby → versions}/test_1.8.rb +14 -14
- data/test/syntax/{ruby → versions}/test_1.9.1.rb +7 -8
- data/test/syntax/{ruby → versions}/test_1.9.3.rb +7 -7
- data/test/syntax/versions/test_2.0.0.rb +37 -0
- data/test/syntax/{ruby → versions}/test_2.2.0.rb +7 -7
- data/test/syntax/versions/test_aliases.rb +129 -0
- data/test/syntax/{ruby → versions}/test_all.rb +1 -1
- metadata +73 -113
- data/lib/regexp_parser/syntax/ruby/1.8.6.rb +0 -37
- data/lib/regexp_parser/syntax/ruby/1.8.7.rb +0 -14
- data/lib/regexp_parser/syntax/ruby/1.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/1.9.1.rb +0 -45
- data/lib/regexp_parser/syntax/ruby/1.9.2.rb +0 -9
- data/lib/regexp_parser/syntax/ruby/1.9.3.rb +0 -19
- data/lib/regexp_parser/syntax/ruby/1.9.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.0.0.rb +0 -23
- data/lib/regexp_parser/syntax/ruby/2.0.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.1.0.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.10.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.9.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.2.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.2.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.10.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.9.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.3.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.3.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.4.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.4.1.rb +0 -15
- data/lib/regexp_parser/syntax/ruby/2.4.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.5.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.5.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.5.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.6.0.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.6.rb +0 -8
- data/test/syntax/ruby/test_2.0.0.rb +0 -32
- data/test/syntax/ruby/test_files.rb +0 -353
@@ -1,16 +0,0 @@
|
|
1
|
-
require File.expand_path('../2.2', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
module Ruby
|
5
|
-
|
6
|
-
class V230 < Regexp::Syntax::Ruby::V22
|
7
|
-
def initialize
|
8
|
-
super
|
9
|
-
|
10
|
-
implements :property, UnicodeProperty::V230
|
11
|
-
implements :nonproperty, UnicodeProperty::V230
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require File.expand_path('../2.3', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
module Ruby
|
5
|
-
|
6
|
-
class V240 < Regexp::Syntax::Ruby::V23
|
7
|
-
def initialize
|
8
|
-
super
|
9
|
-
|
10
|
-
implements :property, UnicodeProperty::V240
|
11
|
-
implements :nonproperty, UnicodeProperty::V240
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require File.expand_path('../2.4', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
module Ruby
|
5
|
-
|
6
|
-
class V250 < Regexp::Syntax::Ruby::V24
|
7
|
-
def initialize
|
8
|
-
super
|
9
|
-
|
10
|
-
implements :property, UnicodeProperty::V250
|
11
|
-
implements :nonproperty, UnicodeProperty::V250
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path("../../../helpers", __FILE__)
|
2
|
-
|
3
|
-
class TestSyntaxRuby_V200 < Test::Unit::TestCase
|
4
|
-
include Regexp::Syntax::Token
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@syntax = Regexp::Syntax.new 'ruby/2.0.0'
|
8
|
-
end
|
9
|
-
|
10
|
-
tests = {
|
11
|
-
:implements => {
|
12
|
-
:property => [
|
13
|
-
UnicodeProperty::Age_V200
|
14
|
-
].flatten,
|
15
|
-
|
16
|
-
:nonproperty => [
|
17
|
-
UnicodeProperty::Age_V200
|
18
|
-
].flatten,
|
19
|
-
},
|
20
|
-
}
|
21
|
-
|
22
|
-
tests.each do |method, types|
|
23
|
-
types.each do |type, tokens|
|
24
|
-
tokens.each do |token|
|
25
|
-
define_method "test_syntax_ruby_v200_#{method}_#{type}_#{token}" do
|
26
|
-
assert_equal true, @syntax.implements?(type, token)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,353 +0,0 @@
|
|
1
|
-
require File.expand_path("../../../helpers", __FILE__)
|
2
|
-
|
3
|
-
class TestSyntaxFiles < Test::Unit::TestCase
|
4
|
-
|
5
|
-
# 1.8 syntax files
|
6
|
-
def test_syntax_file_1_8_6
|
7
|
-
syntax = Regexp::Syntax.new 'ruby/1.8.6'
|
8
|
-
|
9
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V186)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_syntax_file_1_8_7
|
13
|
-
syntax = Regexp::Syntax.new 'ruby/1.8.7'
|
14
|
-
|
15
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V187)
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_syntax_file_1_8_alias
|
19
|
-
syntax = Regexp::Syntax.new 'ruby/1.8'
|
20
|
-
|
21
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V187)
|
22
|
-
end
|
23
|
-
|
24
|
-
|
25
|
-
# 1.9 syntax files
|
26
|
-
def test_syntax_file_1_9_1
|
27
|
-
syntax = Regexp::Syntax.new 'ruby/1.9.1'
|
28
|
-
|
29
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V191)
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_syntax_file_1_9_2
|
33
|
-
syntax = Regexp::Syntax.new 'ruby/1.9.2'
|
34
|
-
|
35
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V192)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_syntax_file_1_9_3
|
39
|
-
syntax = Regexp::Syntax.new 'ruby/1.9.3'
|
40
|
-
|
41
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V193)
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_syntax_file_1_9_alias
|
45
|
-
syntax = Regexp::Syntax.new 'ruby/1.9'
|
46
|
-
|
47
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V193)
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
# 2.0 syntax files
|
52
|
-
def test_syntax_file_2_0_0
|
53
|
-
syntax = Regexp::Syntax.new 'ruby/2.0.0'
|
54
|
-
|
55
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V19)
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_syntax_file_2_0_alias
|
59
|
-
syntax = Regexp::Syntax.new 'ruby/2.0'
|
60
|
-
|
61
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V200)
|
62
|
-
end
|
63
|
-
|
64
|
-
|
65
|
-
# 2.1 syntax files
|
66
|
-
def test_syntax_file_2_1_0
|
67
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.0'
|
68
|
-
|
69
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V20)
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_syntax_file_2_1_2
|
73
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.2'
|
74
|
-
|
75
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V210)
|
76
|
-
end
|
77
|
-
|
78
|
-
def test_syntax_file_2_1_3
|
79
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.3'
|
80
|
-
|
81
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V212)
|
82
|
-
end
|
83
|
-
|
84
|
-
def test_syntax_file_2_1_4
|
85
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.4'
|
86
|
-
|
87
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V213)
|
88
|
-
end
|
89
|
-
|
90
|
-
def test_syntax_file_2_1_5
|
91
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.5'
|
92
|
-
|
93
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V214)
|
94
|
-
end
|
95
|
-
|
96
|
-
def test_syntax_file_2_1_6
|
97
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.6'
|
98
|
-
|
99
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V215)
|
100
|
-
end
|
101
|
-
|
102
|
-
def test_syntax_file_2_1_7
|
103
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.7'
|
104
|
-
|
105
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V216)
|
106
|
-
end
|
107
|
-
|
108
|
-
def test_syntax_file_2_1_8
|
109
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.8'
|
110
|
-
|
111
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V217)
|
112
|
-
end
|
113
|
-
|
114
|
-
def test_syntax_file_2_1_9
|
115
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.9'
|
116
|
-
|
117
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V218)
|
118
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V219)
|
119
|
-
end
|
120
|
-
|
121
|
-
def test_syntax_file_2_1_10
|
122
|
-
syntax = Regexp::Syntax.new 'ruby/2.1.10'
|
123
|
-
|
124
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V219)
|
125
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V2110)
|
126
|
-
end
|
127
|
-
|
128
|
-
def test_syntax_file_2_1_alias
|
129
|
-
syntax = Regexp::Syntax.new 'ruby/2.1'
|
130
|
-
|
131
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V2110)
|
132
|
-
end
|
133
|
-
|
134
|
-
|
135
|
-
# 2.2 syntax files
|
136
|
-
def test_syntax_file_2_2_0
|
137
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.0'
|
138
|
-
|
139
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V21)
|
140
|
-
end
|
141
|
-
|
142
|
-
def test_syntax_file_2_2_1
|
143
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.1'
|
144
|
-
|
145
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V220)
|
146
|
-
end
|
147
|
-
|
148
|
-
def test_syntax_file_2_2_2
|
149
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.2'
|
150
|
-
|
151
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V221)
|
152
|
-
end
|
153
|
-
|
154
|
-
def test_syntax_file_2_2_3
|
155
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.3'
|
156
|
-
|
157
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V223)
|
158
|
-
end
|
159
|
-
|
160
|
-
def test_syntax_file_2_2_4
|
161
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.4'
|
162
|
-
|
163
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V224)
|
164
|
-
end
|
165
|
-
|
166
|
-
def test_syntax_file_2_2_5
|
167
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.5'
|
168
|
-
|
169
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V224)
|
170
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V225)
|
171
|
-
end
|
172
|
-
|
173
|
-
def test_syntax_file_2_2_6
|
174
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.6'
|
175
|
-
|
176
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V225)
|
177
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V226)
|
178
|
-
end
|
179
|
-
|
180
|
-
def test_syntax_file_2_2_7
|
181
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.7'
|
182
|
-
|
183
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V226)
|
184
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V227)
|
185
|
-
end
|
186
|
-
|
187
|
-
def test_syntax_file_2_2_8
|
188
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.8'
|
189
|
-
|
190
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V227)
|
191
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V228)
|
192
|
-
end
|
193
|
-
|
194
|
-
def test_syntax_file_2_2_9
|
195
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.9'
|
196
|
-
|
197
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V228)
|
198
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V229)
|
199
|
-
end
|
200
|
-
|
201
|
-
def test_syntax_file_2_2_10
|
202
|
-
syntax = Regexp::Syntax.new 'ruby/2.2.10'
|
203
|
-
|
204
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V229)
|
205
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V2210)
|
206
|
-
end
|
207
|
-
|
208
|
-
def test_syntax_file_2_2_alias
|
209
|
-
syntax = Regexp::Syntax.new 'ruby/2.2'
|
210
|
-
|
211
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V2210)
|
212
|
-
end
|
213
|
-
|
214
|
-
# 2.3 syntax files
|
215
|
-
def test_syntax_file_2_3_0
|
216
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.0'
|
217
|
-
|
218
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V22)
|
219
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V230)
|
220
|
-
end
|
221
|
-
|
222
|
-
def test_syntax_file_2_3_1
|
223
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.1'
|
224
|
-
|
225
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V230)
|
226
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V231)
|
227
|
-
end
|
228
|
-
|
229
|
-
def test_syntax_file_2_3_2
|
230
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.2'
|
231
|
-
|
232
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V231)
|
233
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V232)
|
234
|
-
end
|
235
|
-
|
236
|
-
def test_syntax_file_2_3_3
|
237
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.3'
|
238
|
-
|
239
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V232)
|
240
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V233)
|
241
|
-
end
|
242
|
-
|
243
|
-
def test_syntax_file_2_3_4
|
244
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.4'
|
245
|
-
|
246
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V233)
|
247
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V234)
|
248
|
-
end
|
249
|
-
|
250
|
-
def test_syntax_file_2_3_5
|
251
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.5'
|
252
|
-
|
253
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V234)
|
254
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V235)
|
255
|
-
end
|
256
|
-
|
257
|
-
def test_syntax_file_2_3_6
|
258
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.6'
|
259
|
-
|
260
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V235)
|
261
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V236)
|
262
|
-
end
|
263
|
-
|
264
|
-
def test_syntax_file_2_3_7
|
265
|
-
syntax = Regexp::Syntax.new 'ruby/2.3.7'
|
266
|
-
|
267
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V236)
|
268
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V237)
|
269
|
-
end
|
270
|
-
|
271
|
-
def test_syntax_file_2_3_alias
|
272
|
-
syntax = Regexp::Syntax.new 'ruby/2.3'
|
273
|
-
|
274
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V237)
|
275
|
-
end
|
276
|
-
|
277
|
-
# 2.4 syntax files
|
278
|
-
def test_syntax_file_2_4_0
|
279
|
-
syntax = Regexp::Syntax.new 'ruby/2.4.0'
|
280
|
-
|
281
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V23)
|
282
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V240)
|
283
|
-
end
|
284
|
-
|
285
|
-
def test_syntax_file_2_4_1
|
286
|
-
syntax = Regexp::Syntax.new 'ruby/2.4.1'
|
287
|
-
|
288
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V240)
|
289
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V241)
|
290
|
-
end
|
291
|
-
|
292
|
-
def test_syntax_file_2_4_2
|
293
|
-
syntax = Regexp::Syntax.new 'ruby/2.4.2'
|
294
|
-
|
295
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V241)
|
296
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V242)
|
297
|
-
end
|
298
|
-
|
299
|
-
def test_syntax_file_2_4_3
|
300
|
-
syntax = Regexp::Syntax.new 'ruby/2.4.3'
|
301
|
-
|
302
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V242)
|
303
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V243)
|
304
|
-
end
|
305
|
-
|
306
|
-
def test_syntax_file_2_4_4
|
307
|
-
syntax = Regexp::Syntax.new 'ruby/2.4.4'
|
308
|
-
|
309
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V243)
|
310
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V244)
|
311
|
-
end
|
312
|
-
|
313
|
-
def test_syntax_file_2_4_alias
|
314
|
-
syntax = Regexp::Syntax.new 'ruby/2.4'
|
315
|
-
|
316
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V244)
|
317
|
-
end
|
318
|
-
|
319
|
-
# 2.5 syntax files
|
320
|
-
def test_syntax_file_2_5_0
|
321
|
-
syntax = Regexp::Syntax.new 'ruby/2.5.0'
|
322
|
-
|
323
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V24)
|
324
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V250)
|
325
|
-
end
|
326
|
-
|
327
|
-
def test_syntax_file_2_5_1
|
328
|
-
syntax = Regexp::Syntax.new 'ruby/2.5.1'
|
329
|
-
|
330
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V250)
|
331
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V251)
|
332
|
-
end
|
333
|
-
|
334
|
-
def test_syntax_file_2_5_alias
|
335
|
-
syntax = Regexp::Syntax.new 'ruby/2.5'
|
336
|
-
|
337
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V251)
|
338
|
-
end
|
339
|
-
|
340
|
-
# 2.6 syntax files
|
341
|
-
def test_syntax_file_2_6_0
|
342
|
-
syntax = Regexp::Syntax.new 'ruby/2.6.0'
|
343
|
-
|
344
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V25)
|
345
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V260)
|
346
|
-
end
|
347
|
-
|
348
|
-
def test_syntax_file_2_6_alias
|
349
|
-
syntax = Regexp::Syntax.new 'ruby/2.6'
|
350
|
-
|
351
|
-
assert syntax.kind_of?(Regexp::Syntax::Ruby::V260)
|
352
|
-
end
|
353
|
-
end
|