cucumber-cucumber-expressions 17.0.0 → 17.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/cucumber-cucumber-expressions.gemspec +7 -9
- data/lib/cucumber/cucumber_expressions/argument.rb +2 -1
- data/lib/cucumber/cucumber_expressions/cucumber_expression_generator.rb +4 -4
- data/lib/cucumber/cucumber_expressions/group_builder.rb +1 -1
- data/lib/cucumber/cucumber_expressions/parameter_type_registry.rb +15 -13
- data/lib/cucumber/cucumber_expressions/regular_expression.rb +1 -1
- data/lib/cucumber/cucumber_expressions/tree_regexp.rb +3 -3
- data/spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb +6 -6
- data/spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb +10 -10
- data/spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb +23 -23
- data/spec/cucumber/cucumber_expressions/parameter_type_spec.rb +3 -2
- data/spec/cucumber/cucumber_expressions/tree_regexp_spec.rb +1 -1
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1302afcc82ce4965f46efebeeea9315e680395bc915142f572ee1f025eecb0
|
4
|
+
data.tar.gz: 06d986ddaaaed001bd00e82059eb685cbb6507241b64b6081905c4373d620e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ca20260b78e485d7d5f3d085529843c7195a53c0289464b9d02f782bcd1431153dbfc5df1e58ea7c02432d04a9df8d7a60b648f31f4736632697efa1f9addd6
|
7
|
+
data.tar.gz: a66a69755c51e1d1e154ac51230e9f8b784b86a3336ba4b6f87c04c4fc445081bef66c733954ed76d908433ef8648fcff8e5805c5ea01a22d5e2ca1490f4ce21
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
17.0.
|
1
|
+
17.0.1
|
@@ -16,20 +16,18 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.required_ruby_version = '>= 2.5'
|
17
17
|
|
18
18
|
s.metadata = {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
'bug_tracker_uri' => 'https://github.com/cucumber/cucumber/issues',
|
20
|
+
'changelog_uri' => 'https://github.com/cucumber/common/blob/main/cucumber-expressions/CHANGELOG.md',
|
21
|
+
'documentation_uri' => 'https://cucumber.io/docs/cucumber/cucumber-expressions/',
|
22
|
+
'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/cukes',
|
23
|
+
'source_code_uri' => 'https://github.com/cucumber/common/blob/main/cucumber-expressions/ruby',
|
24
|
+
}
|
25
25
|
|
26
26
|
s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
27
27
|
s.add_development_dependency 'rspec', '~> 3.11', '>= 3.11.0'
|
28
28
|
s.add_development_dependency 'rubocop', '~> 1.27.0'
|
29
29
|
|
30
|
-
s.
|
31
|
-
s.files = `git ls-files`.split("\n").reject {|path| path =~ /\.gitignore$/ }
|
32
|
-
s.test_files = `git ls-files -- spec/*`.split("\n")
|
30
|
+
s.files = `git ls-files`.split("\n").reject { |path| path =~ /\.gitignore$/ }
|
33
31
|
s.rdoc_options = ['--charset=UTF-8']
|
34
32
|
s.require_path = 'lib'
|
35
33
|
end
|
@@ -16,7 +16,8 @@ module Cucumber
|
|
16
16
|
|
17
17
|
if arg_groups.length != parameter_types.length
|
18
18
|
raise CucumberExpressionError.new(
|
19
|
-
"Expression #{tree_regexp.regexp.inspect} has #{arg_groups.length} capture groups (#{arg_groups.map(&:value)}),
|
19
|
+
"Expression #{tree_regexp.regexp.inspect} has #{arg_groups.length} capture groups (#{arg_groups.map(&:value)}), " \
|
20
|
+
"but there were #{parameter_types.length} parameter types (#{parameter_types.map(&:name)})"
|
20
21
|
)
|
21
22
|
end
|
22
23
|
|
@@ -64,7 +64,7 @@ module Cucumber
|
|
64
64
|
).generate_expressions
|
65
65
|
end
|
66
66
|
|
67
|
-
|
67
|
+
private
|
68
68
|
|
69
69
|
def create_parameter_type_matchers(text)
|
70
70
|
parameter_matchers = []
|
@@ -84,9 +84,9 @@ module Cucumber
|
|
84
84
|
|
85
85
|
def escape(s)
|
86
86
|
s.gsub(/%/, '%%')
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
.gsub(/\(/, '\\(')
|
88
|
+
.gsub(/{/, '\\{')
|
89
|
+
.gsub(/\//, '\\/')
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
@@ -18,7 +18,7 @@ module Cucumber
|
|
18
18
|
|
19
19
|
def build(match, group_indices)
|
20
20
|
group_index = group_indices.next
|
21
|
-
children = @group_builders.map {|gb| gb.build(match, group_indices)}
|
21
|
+
children = @group_builders.map { |gb| gb.build(match, group_indices) }
|
22
22
|
Group.new(match[group_index], match.offset(group_index)[0], match.offset(group_index)[1], children)
|
23
23
|
end
|
24
24
|
|
@@ -16,19 +16,19 @@ module Cucumber
|
|
16
16
|
|
17
17
|
def initialize
|
18
18
|
@parameter_type_by_name = {}
|
19
|
-
@parameter_types_by_regexp = Hash.new {|hash, regexp| hash[regexp] = []}
|
19
|
+
@parameter_types_by_regexp = Hash.new { |hash, regexp| hash[regexp] = [] }
|
20
20
|
|
21
|
-
define_parameter_type(ParameterType.new('int', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i}, true, true))
|
22
|
-
define_parameter_type(ParameterType.new('float', FLOAT_REGEXP, Float, ->(s = nil) { s && s.to_f}, true, false))
|
23
|
-
define_parameter_type(ParameterType.new('word', WORD_REGEXP, String, ->(s = nil) { s}, false, false))
|
24
|
-
define_parameter_type(ParameterType.new('string', STRING_REGEXP, String, ->(s1, s2) { arg = s1 != nil ? s1 : s2; arg.gsub(
|
25
|
-
define_parameter_type(ParameterType.new('', ANONYMOUS_REGEXP, String, ->(s = nil) { s}, false, true))
|
26
|
-
define_parameter_type(ParameterType.new('bigdecimal', FLOAT_REGEXP, BigDecimal, ->(s = nil) { BigDecimal(s)}, false, false))
|
27
|
-
define_parameter_type(ParameterType.new('biginteger', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i}, false, false))
|
28
|
-
define_parameter_type(ParameterType.new('byte', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i}, false, false))
|
29
|
-
define_parameter_type(ParameterType.new('short', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i}, false, false))
|
30
|
-
define_parameter_type(ParameterType.new('long', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i}, false, false))
|
31
|
-
define_parameter_type(ParameterType.new('double', FLOAT_REGEXP, Float, ->(s = nil) { s && s.to_f}, false, false))
|
21
|
+
define_parameter_type(ParameterType.new('int', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i }, true, true))
|
22
|
+
define_parameter_type(ParameterType.new('float', FLOAT_REGEXP, Float, ->(s = nil) { s && s.to_f }, true, false))
|
23
|
+
define_parameter_type(ParameterType.new('word', WORD_REGEXP, String, ->(s = nil) { s }, false, false))
|
24
|
+
define_parameter_type(ParameterType.new('string', STRING_REGEXP, String, ->(s1, s2) { arg = s1 != nil ? s1 : s2; arg.gsub('\\"', '"').gsub("\\'", "'") }, true, false))
|
25
|
+
define_parameter_type(ParameterType.new('', ANONYMOUS_REGEXP, String, ->(s = nil) { s }, false, true))
|
26
|
+
define_parameter_type(ParameterType.new('bigdecimal', FLOAT_REGEXP, BigDecimal, ->(s = nil) { BigDecimal(s) }, false, false))
|
27
|
+
define_parameter_type(ParameterType.new('biginteger', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i }, false, false))
|
28
|
+
define_parameter_type(ParameterType.new('byte', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i }, false, false))
|
29
|
+
define_parameter_type(ParameterType.new('short', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i }, false, false))
|
30
|
+
define_parameter_type(ParameterType.new('long', INTEGER_REGEXPS, Integer, ->(s = nil) { s && s.to_i }, false, false))
|
31
|
+
define_parameter_type(ParameterType.new('double', FLOAT_REGEXP, Float, ->(s = nil) { s && s.to_f }, false, false))
|
32
32
|
end
|
33
33
|
|
34
34
|
def lookup_by_type_name(name)
|
@@ -68,7 +68,9 @@ module Cucumber
|
|
68
68
|
parameter_type.regexps.each do |parameter_type_regexp|
|
69
69
|
parameter_types = @parameter_types_by_regexp[parameter_type_regexp]
|
70
70
|
if parameter_types.any? && parameter_types[0].prefer_for_regexp_match && parameter_type.prefer_for_regexp_match
|
71
|
-
raise CucumberExpressionError.new(
|
71
|
+
raise CucumberExpressionError.new(
|
72
|
+
"There can only be one preferential parameter type per regexp. The regexp /#{parameter_type_regexp}/ is used for two: {#{parameter_types[0].name}} and {#{parameter_type.name}}"
|
73
|
+
)
|
72
74
|
end
|
73
75
|
|
74
76
|
parameter_types.push(parameter_type)
|
@@ -23,12 +23,12 @@ module Cucumber
|
|
23
23
|
|
24
24
|
private def is_non_capturing(source, i)
|
25
25
|
# Regex is valid. Bounds check not required.
|
26
|
-
if source[i+1] != '?'
|
26
|
+
if source[i + 1] != '?'
|
27
27
|
# (X)
|
28
28
|
return false
|
29
29
|
end
|
30
30
|
|
31
|
-
if source[i+2] != '<'
|
31
|
+
if source[i + 2] != '<'
|
32
32
|
# (?:X)
|
33
33
|
# (?idmsuxU-idmsuxU)
|
34
34
|
# (?idmsux-idmsux:X)
|
@@ -38,7 +38,7 @@ module Cucumber
|
|
38
38
|
return true
|
39
39
|
end
|
40
40
|
|
41
|
-
if source[i+3] == '=' || source[i+3] == '!'
|
41
|
+
if source[i + 3] == '=' || source[i + 3] == '!'
|
42
42
|
# (?<=X)
|
43
43
|
# (?<!X)
|
44
44
|
return true
|
@@ -15,13 +15,13 @@ module Cucumber
|
|
15
15
|
it 'generates multiple expressions' do
|
16
16
|
parameter_type_combinations = [
|
17
17
|
[
|
18
|
-
ParameterType.new('color', /red|blue|yellow/, Color, ->(s) { Color.new}, true, false),
|
19
|
-
ParameterType.new('csscolor', /red|blue|yellow/, CssColor, ->(s) { CssColor.new}, true, false)
|
18
|
+
ParameterType.new('color', /red|blue|yellow/, Color, ->(s) { Color.new }, true, false),
|
19
|
+
ParameterType.new('csscolor', /red|blue|yellow/, CssColor, ->(s) { CssColor.new }, true, false)
|
20
20
|
],
|
21
21
|
[
|
22
|
-
ParameterType.new('date', /\d{4}-\d{2}-\d{2}/, Date, ->(s) { Date.new}, true, false),
|
23
|
-
ParameterType.new('datetime', /\d{4}-\d{2}-\d{2}/, DateTime, ->(s) { DateTime.new}, true, false),
|
24
|
-
ParameterType.new('timestamp', /\d{4}-\d{2}-\d{2}/, Timestamp, ->(s) { Timestamp.new}, true, false)
|
22
|
+
ParameterType.new('date', /\d{4}-\d{2}-\d{2}/, Date, ->(s) { Date.new }, true, false),
|
23
|
+
ParameterType.new('datetime', /\d{4}-\d{2}-\d{2}/, DateTime, ->(s) { DateTime.new }, true, false),
|
24
|
+
ParameterType.new('timestamp', /\d{4}-\d{2}-\d{2}/, Timestamp, ->(s) { Timestamp.new }, true, false)
|
25
25
|
]
|
26
26
|
]
|
27
27
|
|
@@ -29,7 +29,7 @@ module Cucumber
|
|
29
29
|
'I bought a {%s} ball on {%s}',
|
30
30
|
parameter_type_combinations
|
31
31
|
)
|
32
|
-
expressions = factory.generate_expressions.map {|ge| ge.source}
|
32
|
+
expressions = factory.generate_expressions.map { |ge| ge.source }
|
33
33
|
expect(expressions).to eq([
|
34
34
|
'I bought a {color} ball on {date}',
|
35
35
|
'I bought a {color} ball on {datetime}',
|
@@ -50,7 +50,7 @@ module Cucumber
|
|
50
50
|
'color', # name
|
51
51
|
/red|blue|yellow/, # regexp
|
52
52
|
Color, # type
|
53
|
-
->(s) { Color.new(s)},
|
53
|
+
->(s) { Color.new(s) }, # transform
|
54
54
|
true, # use_for_snippets
|
55
55
|
false # prefer_for_regexp_match
|
56
56
|
)
|
@@ -64,7 +64,7 @@ module Cucumber
|
|
64
64
|
'[string]',
|
65
65
|
/.*/,
|
66
66
|
String,
|
67
|
-
->(s) { s},
|
67
|
+
->(s) { s },
|
68
68
|
true,
|
69
69
|
false
|
70
70
|
)
|
@@ -85,7 +85,7 @@ module Cucumber
|
|
85
85
|
'coordinate',
|
86
86
|
/(\d+),\s*(\d+),\s*(\d+)/,
|
87
87
|
Coordinate,
|
88
|
-
->(x, y, z) { Coordinate.new(x.to_i, y.to_i, z.to_i)},
|
88
|
+
->(x, y, z) { Coordinate.new(x.to_i, y.to_i, z.to_i) },
|
89
89
|
true,
|
90
90
|
false
|
91
91
|
)
|
@@ -111,7 +111,7 @@ module Cucumber
|
|
111
111
|
'color',
|
112
112
|
[/red|blue|yellow/, /(?:dark|light) (?:red|blue|yellow)/],
|
113
113
|
Color,
|
114
|
-
->(s) { Color.new(s)},
|
114
|
+
->(s) { Color.new(s) },
|
115
115
|
true,
|
116
116
|
false
|
117
117
|
)
|
@@ -128,7 +128,7 @@ module Cucumber
|
|
128
128
|
'throwing',
|
129
129
|
/bad/,
|
130
130
|
CssColor,
|
131
|
-
->(s) { raise "Can't transform [#{s}]"},
|
131
|
+
->(s) { raise "Can't transform [#{s}]" },
|
132
132
|
true,
|
133
133
|
false
|
134
134
|
)
|
@@ -136,7 +136,7 @@ module Cucumber
|
|
136
136
|
expression = CucumberExpression.new('I have a {throwing} parameter', @parameter_type_registry)
|
137
137
|
args = expression.match('I have a bad parameter')
|
138
138
|
|
139
|
-
expect {args[0].value(nil)}.to raise_error("Can't transform [bad]")
|
139
|
+
expect { args[0].value(nil) }.to raise_error("Can't transform [bad]")
|
140
140
|
end
|
141
141
|
|
142
142
|
describe 'conflicting parameter type' do
|
@@ -147,7 +147,7 @@ module Cucumber
|
|
147
147
|
'color',
|
148
148
|
/.*/,
|
149
149
|
CssColor,
|
150
|
-
->(s) { CssColor.new(s)},
|
150
|
+
->(s) { CssColor.new(s) },
|
151
151
|
true,
|
152
152
|
false
|
153
153
|
)
|
@@ -161,7 +161,7 @@ module Cucumber
|
|
161
161
|
'whatever',
|
162
162
|
/.*/,
|
163
163
|
Color,
|
164
|
-
->(s) { Color.new(s)},
|
164
|
+
->(s) { Color.new(s) },
|
165
165
|
false,
|
166
166
|
false
|
167
167
|
)
|
@@ -174,7 +174,7 @@ module Cucumber
|
|
174
174
|
'css-color',
|
175
175
|
/red|blue|yellow/,
|
176
176
|
CssColor,
|
177
|
-
->(s) { CssColor.new(s)},
|
177
|
+
->(s) { CssColor.new(s) },
|
178
178
|
true,
|
179
179
|
false
|
180
180
|
)
|
@@ -200,7 +200,7 @@ module Cucumber
|
|
200
200
|
nil,
|
201
201
|
/red|blue|yellow/,
|
202
202
|
Color,
|
203
|
-
->(s) { Color.new(s)},
|
203
|
+
->(s) { Color.new(s) },
|
204
204
|
true,
|
205
205
|
false
|
206
206
|
)
|
@@ -18,10 +18,10 @@ module Cucumber
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'does not allow more than one prefer_for_regexp_match parameter type for each regexp' do
|
21
|
-
@registry.define_parameter_type(ParameterType.new('name', CAPITALISED_WORD, Name, ->(s) { Name.new}, true, true))
|
22
|
-
@registry.define_parameter_type(ParameterType.new('person', CAPITALISED_WORD, Person, ->(s) { Person.new}, true, false))
|
21
|
+
@registry.define_parameter_type(ParameterType.new('name', CAPITALISED_WORD, Name, ->(s) { Name.new }, true, true))
|
22
|
+
@registry.define_parameter_type(ParameterType.new('person', CAPITALISED_WORD, Person, ->(s) { Person.new }, true, false))
|
23
23
|
expect do
|
24
|
-
@registry.define_parameter_type(ParameterType.new('place', CAPITALISED_WORD, Place, ->(s) { Place.new}, true, true))
|
24
|
+
@registry.define_parameter_type(ParameterType.new('place', CAPITALISED_WORD, Place, ->(s) { Place.new }, true, true))
|
25
25
|
end.to raise_error(
|
26
26
|
CucumberExpressionError,
|
27
27
|
'There can only be one preferential parameter type per regexp. The regexp /[A-Z]+\\w+/ is used for two preferential parameter types, {name} and {place}'
|
@@ -29,9 +29,9 @@ module Cucumber
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'looks up prefer_for_regexp_match parameter type by regexp' do
|
32
|
-
name = ParameterType.new('name', CAPITALISED_WORD, Name, ->(s) { Name.new}, true, false)
|
33
|
-
person = ParameterType.new('person', CAPITALISED_WORD, Person, ->(s) { Person.new}, true, true)
|
34
|
-
place = ParameterType.new('place', CAPITALISED_WORD, Place, ->(s) { Place.new}, true, false)
|
32
|
+
name = ParameterType.new('name', CAPITALISED_WORD, Name, ->(s) { Name.new }, true, false)
|
33
|
+
person = ParameterType.new('person', CAPITALISED_WORD, Person, ->(s) { Person.new }, true, true)
|
34
|
+
place = ParameterType.new('place', CAPITALISED_WORD, Place, ->(s) { Place.new }, true, false)
|
35
35
|
|
36
36
|
@registry.define_parameter_type(name)
|
37
37
|
@registry.define_parameter_type(person)
|
@@ -41,9 +41,9 @@ module Cucumber
|
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'throws ambiguous exception when no parameter types are prefer_for_regexp_match' do
|
44
|
-
name = ParameterType.new('name', CAPITALISED_WORD, Name, ->(s) { Name.new}, true, false)
|
45
|
-
person = ParameterType.new('person', CAPITALISED_WORD, Person, ->(s) { Person.new}, true, false)
|
46
|
-
place = ParameterType.new('place', CAPITALISED_WORD, Place, ->(s) { Place.new}, true, false)
|
44
|
+
name = ParameterType.new('name', CAPITALISED_WORD, Name, ->(s) { Name.new }, true, false)
|
45
|
+
person = ParameterType.new('person', CAPITALISED_WORD, Person, ->(s) { Person.new }, true, false)
|
46
|
+
place = ParameterType.new('place', CAPITALISED_WORD, Place, ->(s) { Place.new }, true, false)
|
47
47
|
|
48
48
|
@registry.define_parameter_type(name)
|
49
49
|
@registry.define_parameter_type(person)
|
@@ -54,23 +54,23 @@ module Cucumber
|
|
54
54
|
end.to raise_error(
|
55
55
|
CucumberExpressionError,
|
56
56
|
"Your Regular Expression /([A-Z]+\\w+) and ([A-Z]+\\w+)/\n" \
|
57
|
-
"matches multiple parameter types with regexp /[A-Z]+\\w+/:\n" \
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
57
|
+
"matches multiple parameter types with regexp /[A-Z]+\\w+/:\n " \
|
58
|
+
"{name}\n " \
|
59
|
+
"{person}\n " \
|
60
|
+
"{place}\n" \
|
61
61
|
"\n" \
|
62
62
|
"I couldn't decide which one to use. You have two options:\n" \
|
63
63
|
"\n" \
|
64
|
-
"1) Use a Cucumber Expression instead of a Regular Expression. Try one of these:\n" \
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"
|
64
|
+
"1) Use a Cucumber Expression instead of a Regular Expression. Try one of these:\n " \
|
65
|
+
"{name} and {name}\n " \
|
66
|
+
"{name} and {person}\n " \
|
67
|
+
"{name} and {place}\n " \
|
68
|
+
"{person} and {name}\n " \
|
69
|
+
"{person} and {person}\n " \
|
70
|
+
"{person} and {place}\n " \
|
71
|
+
"{place} and {name}\n " \
|
72
|
+
"{place} and {person}\n " \
|
73
|
+
"{place} and {place}\n" \
|
74
74
|
"\n" \
|
75
75
|
"2) Make one of the parameter types preferential and continue to use a Regular Expression.\n" \
|
76
76
|
"\n"
|
@@ -7,10 +7,11 @@ module Cucumber
|
|
7
7
|
describe ParameterType do
|
8
8
|
it 'does not allow ignore flag on regexp' do
|
9
9
|
expect do
|
10
|
-
ParameterType.new('case-insensitive', /[a-z]+/i, String, ->(s) { s}, true, true)
|
10
|
+
ParameterType.new('case-insensitive', /[a-z]+/i, String, ->(s) { s }, true, true)
|
11
11
|
end.to raise_error(
|
12
12
|
CucumberExpressionError,
|
13
|
-
"ParameterType Regexps can't use option Regexp::IGNORECASE"
|
13
|
+
"ParameterType Regexps can't use option Regexp::IGNORECASE"
|
14
|
+
)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
@@ -7,7 +7,7 @@ module Cucumber
|
|
7
7
|
describe TreeRegexp do
|
8
8
|
it 'exposes the group source' do
|
9
9
|
tr = TreeRegexp.new(/(a(?:b)?)(c)/)
|
10
|
-
expect(tr.group_builder.children.map {|gb| gb.source}).to eq(['a(?:b)?', 'c'])
|
10
|
+
expect(tr.group_builder.children.map { |gb| gb.source }).to eq(['a(?:b)?', 'c'])
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'builds a tree' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-cucumber-expressions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 17.0.
|
4
|
+
version: 17.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -134,18 +134,5 @@ requirements: []
|
|
134
134
|
rubygems_version: 3.4.10
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
|
-
summary: cucumber-expressions-17.0.
|
138
|
-
test_files:
|
139
|
-
- spec/cucumber/cucumber_expressions/argument_spec.rb
|
140
|
-
- spec/cucumber/cucumber_expressions/combinatorial_generated_expression_factory_test.rb
|
141
|
-
- spec/cucumber/cucumber_expressions/cucumber_expression_generator_spec.rb
|
142
|
-
- spec/cucumber/cucumber_expressions/cucumber_expression_parser_spec.rb
|
143
|
-
- spec/cucumber/cucumber_expressions/cucumber_expression_spec.rb
|
144
|
-
- spec/cucumber/cucumber_expressions/cucumber_expression_tokenizer_spec.rb
|
145
|
-
- spec/cucumber/cucumber_expressions/cucumber_expression_transformation_spec.rb
|
146
|
-
- spec/cucumber/cucumber_expressions/custom_parameter_type_spec.rb
|
147
|
-
- spec/cucumber/cucumber_expressions/expression_factory_spec.rb
|
148
|
-
- spec/cucumber/cucumber_expressions/parameter_type_registry_spec.rb
|
149
|
-
- spec/cucumber/cucumber_expressions/parameter_type_spec.rb
|
150
|
-
- spec/cucumber/cucumber_expressions/regular_expression_spec.rb
|
151
|
-
- spec/cucumber/cucumber_expressions/tree_regexp_spec.rb
|
137
|
+
summary: cucumber-expressions-17.0.1
|
138
|
+
test_files: []
|