gherkin 2.5.4-x86-mswin32 → 2.6.0-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Gemfile.lock +9 -7
- data/History.md +11 -1
- data/README.md +1 -1
- data/features/json_formatter.feature +376 -310
- data/features/json_parser.feature +245 -228
- data/features/step_definitions/json_formatter_steps.rb +7 -4
- data/features/step_definitions/json_parser_steps.rb +1 -1
- data/features/step_definitions/pretty_formatter_steps.rb +2 -1
- data/gherkin.gemspec +4 -3
- data/lib/1.8/gherkin_lexer_ar.so +0 -0
- data/lib/1.8/gherkin_lexer_bg.so +0 -0
- data/lib/1.8/gherkin_lexer_ca.so +0 -0
- data/lib/1.8/gherkin_lexer_cs.so +0 -0
- data/lib/1.8/gherkin_lexer_cy_gb.so +0 -0
- data/lib/1.8/gherkin_lexer_da.so +0 -0
- data/lib/1.8/gherkin_lexer_de.so +0 -0
- data/lib/1.8/gherkin_lexer_en.so +0 -0
- data/lib/1.8/gherkin_lexer_en_au.so +0 -0
- data/lib/1.8/gherkin_lexer_en_lol.so +0 -0
- data/lib/1.8/gherkin_lexer_en_pirate.so +0 -0
- data/lib/1.8/gherkin_lexer_en_scouse.so +0 -0
- data/lib/1.8/gherkin_lexer_en_tx.so +0 -0
- data/lib/1.8/gherkin_lexer_eo.so +0 -0
- data/lib/1.8/gherkin_lexer_es.so +0 -0
- data/lib/1.8/gherkin_lexer_et.so +0 -0
- data/lib/1.8/gherkin_lexer_fi.so +0 -0
- data/lib/1.8/gherkin_lexer_fr.so +0 -0
- data/lib/1.8/gherkin_lexer_he.so +0 -0
- data/lib/1.8/gherkin_lexer_hr.so +0 -0
- data/lib/1.8/gherkin_lexer_hu.so +0 -0
- data/lib/1.8/gherkin_lexer_id.so +0 -0
- data/lib/1.8/gherkin_lexer_is.so +0 -0
- data/lib/1.8/gherkin_lexer_it.so +0 -0
- data/lib/1.8/gherkin_lexer_ja.so +0 -0
- data/lib/1.8/gherkin_lexer_ko.so +0 -0
- data/lib/1.8/gherkin_lexer_lt.so +0 -0
- data/lib/1.8/gherkin_lexer_lu.so +0 -0
- data/lib/1.8/gherkin_lexer_lv.so +0 -0
- data/lib/1.8/gherkin_lexer_nl.so +0 -0
- data/lib/1.8/gherkin_lexer_no.so +0 -0
- data/lib/1.8/gherkin_lexer_pl.so +0 -0
- data/lib/1.8/gherkin_lexer_pt.so +0 -0
- data/lib/1.8/gherkin_lexer_ro.so +0 -0
- data/lib/1.8/gherkin_lexer_ru.so +0 -0
- data/lib/1.8/gherkin_lexer_sk.so +0 -0
- data/lib/1.8/gherkin_lexer_sr_cyrl.so +0 -0
- data/lib/1.8/gherkin_lexer_sr_latn.so +0 -0
- data/lib/1.8/gherkin_lexer_sv.so +0 -0
- data/lib/1.8/gherkin_lexer_tr.so +0 -0
- data/lib/1.8/gherkin_lexer_uk.so +0 -0
- data/lib/1.8/gherkin_lexer_uz.so +0 -0
- data/lib/1.8/gherkin_lexer_vi.so +0 -0
- data/lib/1.8/gherkin_lexer_zh_cn.so +0 -0
- data/lib/1.8/gherkin_lexer_zh_tw.so +0 -0
- data/lib/1.9/gherkin_lexer_ar.so +0 -0
- data/lib/1.9/gherkin_lexer_bg.so +0 -0
- data/lib/1.9/gherkin_lexer_ca.so +0 -0
- data/lib/1.9/gherkin_lexer_cs.so +0 -0
- data/lib/1.9/gherkin_lexer_cy_gb.so +0 -0
- data/lib/1.9/gherkin_lexer_da.so +0 -0
- data/lib/1.9/gherkin_lexer_de.so +0 -0
- data/lib/1.9/gherkin_lexer_en.so +0 -0
- data/lib/1.9/gherkin_lexer_en_au.so +0 -0
- data/lib/1.9/gherkin_lexer_en_lol.so +0 -0
- data/lib/1.9/gherkin_lexer_en_pirate.so +0 -0
- data/lib/1.9/gherkin_lexer_en_scouse.so +0 -0
- data/lib/1.9/gherkin_lexer_en_tx.so +0 -0
- data/lib/1.9/gherkin_lexer_eo.so +0 -0
- data/lib/1.9/gherkin_lexer_es.so +0 -0
- data/lib/1.9/gherkin_lexer_et.so +0 -0
- data/lib/1.9/gherkin_lexer_fi.so +0 -0
- data/lib/1.9/gherkin_lexer_fr.so +0 -0
- data/lib/1.9/gherkin_lexer_he.so +0 -0
- data/lib/1.9/gherkin_lexer_hr.so +0 -0
- data/lib/1.9/gherkin_lexer_hu.so +0 -0
- data/lib/1.9/gherkin_lexer_id.so +0 -0
- data/lib/1.9/gherkin_lexer_is.so +0 -0
- data/lib/1.9/gherkin_lexer_it.so +0 -0
- data/lib/1.9/gherkin_lexer_ja.so +0 -0
- data/lib/1.9/gherkin_lexer_ko.so +0 -0
- data/lib/1.9/gherkin_lexer_lt.so +0 -0
- data/lib/1.9/gherkin_lexer_lu.so +0 -0
- data/lib/1.9/gherkin_lexer_lv.so +0 -0
- data/lib/1.9/gherkin_lexer_nl.so +0 -0
- data/lib/1.9/gherkin_lexer_no.so +0 -0
- data/lib/1.9/gherkin_lexer_pl.so +0 -0
- data/lib/1.9/gherkin_lexer_pt.so +0 -0
- data/lib/1.9/gherkin_lexer_ro.so +0 -0
- data/lib/1.9/gherkin_lexer_ru.so +0 -0
- data/lib/1.9/gherkin_lexer_sk.so +0 -0
- data/lib/1.9/gherkin_lexer_sr_cyrl.so +0 -0
- data/lib/1.9/gherkin_lexer_sr_latn.so +0 -0
- data/lib/1.9/gherkin_lexer_sv.so +0 -0
- data/lib/1.9/gherkin_lexer_tr.so +0 -0
- data/lib/1.9/gherkin_lexer_uk.so +0 -0
- data/lib/1.9/gherkin_lexer_uz.so +0 -0
- data/lib/1.9/gherkin_lexer_vi.so +0 -0
- data/lib/1.9/gherkin_lexer_zh_cn.so +0 -0
- data/lib/1.9/gherkin_lexer_zh_tw.so +0 -0
- data/lib/gherkin/formatter/json_formatter.rb +13 -9
- data/lib/gherkin/formatter/model.rb +78 -20
- data/lib/gherkin/formatter/pretty_formatter.rb +1 -1
- data/lib/gherkin/json_parser.rb +32 -24
- data/lib/gherkin/listener/formatter_listener.rb +76 -50
- data/spec/gherkin/fixtures/complex.json +8 -1
- data/spec/gherkin/formatter/json_formatter_spec.rb +49 -43
- data/spec/gherkin/formatter/model_spec.rb +2 -2
- data/spec/gherkin/formatter/pretty_formatter_spec.rb +10 -10
- data/spec/gherkin/json_parser_spec.rb +93 -77
- data/spec/gherkin/sexp_recorder.rb +0 -3
- metadata +25 -25
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gherkin (2.
|
4
|
+
gherkin (2.6.0)
|
5
5
|
json (>= 1.4.6)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
10
|
builder (3.0.0)
|
11
|
-
cucumber (1.1.
|
11
|
+
cucumber (1.1.1)
|
12
12
|
builder (>= 2.1.2)
|
13
13
|
diff-lcs (>= 1.1.2)
|
14
|
-
gherkin (~> 2.
|
14
|
+
gherkin (~> 2.6.0)
|
15
15
|
json (>= 1.4.6)
|
16
16
|
term-ansicolor (>= 1.0.6)
|
17
17
|
diff-lcs (1.1.3)
|
18
18
|
json (1.6.1)
|
19
|
+
json (1.6.1-java)
|
19
20
|
libv8 (3.3.10.2)
|
20
|
-
rake (0.9.2)
|
21
|
+
rake (0.9.2.2)
|
21
22
|
rake-compiler (0.7.9)
|
22
23
|
rake
|
23
24
|
rdiscount (1.6.8)
|
@@ -25,7 +26,7 @@ GEM
|
|
25
26
|
rspec-core (~> 2.7.0)
|
26
27
|
rspec-expectations (~> 2.7.0)
|
27
28
|
rspec-mocks (~> 2.7.0)
|
28
|
-
rspec-core (2.7.
|
29
|
+
rspec-core (2.7.1)
|
29
30
|
rspec-expectations (2.7.0)
|
30
31
|
diff-lcs (~> 1.1.2)
|
31
32
|
rspec-mocks (2.7.0)
|
@@ -35,17 +36,18 @@ GEM
|
|
35
36
|
yard (0.7.3)
|
36
37
|
|
37
38
|
PLATFORMS
|
39
|
+
java
|
38
40
|
ruby
|
39
41
|
|
40
42
|
DEPENDENCIES
|
41
43
|
builder (>= 2.1.2)
|
42
44
|
bundler (>= 1.0.21)
|
43
|
-
cucumber (>= 1.1.
|
45
|
+
cucumber (>= 1.1.1)
|
44
46
|
gherkin!
|
45
47
|
rake (>= 0.9.2)
|
46
48
|
rake-compiler (>= 0.7.9)
|
47
49
|
rdiscount (>= 1.6.8)
|
48
|
-
rspec (>= 2.
|
50
|
+
rspec (>= 2.7.0)
|
49
51
|
term-ansicolor (>= 1.0.6)
|
50
52
|
therubyracer (>= 0.9.8)
|
51
53
|
yard (>= 0.7.2)
|
data/History.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## [2.6.0](https://github.com/cucumber/gherkin/compare/v2.5.4...v2.6.0)
|
2
|
+
|
3
|
+
### Changed Features
|
4
|
+
|
5
|
+
* JSON formatter must handle multiple features ([#140](https://github.com/cucumber/gherkin/issues/140) Aslak Hellesøy)
|
6
|
+
|
7
|
+
### New Features
|
8
|
+
|
9
|
+
* Identifiers for Gherkin elements ([#131](https://github.com/cucumber/gherkin/issues/131) Matt Wynne, Aslak Hellesøy)
|
10
|
+
|
1
11
|
## [2.5.4](https://github.com/cucumber/gherkin/compare/v2.5.3...v2.5.4)
|
2
12
|
|
3
13
|
### New Features
|
@@ -15,7 +25,7 @@
|
|
15
25
|
* Added synonyms for Portuguese. (Rodrigo Dumont)
|
16
26
|
* Added synonyms for Italian. (Alessandro Mencarini)
|
17
27
|
* Added synonyms for Spanish. (Nahuel Garbezza)
|
18
|
-
* Added synonyms for French. (
|
28
|
+
* Added synonyms for French. (Julien Biezemans)
|
19
29
|
|
20
30
|
## [2.5.1](https://github.com/cucumber/gherkin/compare/v2.5.0...v2.5.1)
|
21
31
|
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ The jar file is in the central Maven repo.
|
|
54
54
|
<dependency>
|
55
55
|
<groupId>info.cukes</groupId>
|
56
56
|
<artifactId>gherkin</artifactId>
|
57
|
-
<version>2.
|
57
|
+
<version>2.6.0</version>
|
58
58
|
</dependency>
|
59
59
|
|
60
60
|
You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
|
@@ -13,15 +13,52 @@ Feature: JSON formatter
|
|
13
13
|
# Another comment
|
14
14
|
Egenskap: Kjapp
|
15
15
|
"""
|
16
|
+
And the following text is parsed:
|
17
|
+
"""
|
18
|
+
# language: no
|
19
|
+
# Yet another comment
|
20
|
+
Egenskap: Kjappere
|
21
|
+
"""
|
16
22
|
Then the outputted JSON should be:
|
17
23
|
"""
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
24
|
+
[
|
25
|
+
{
|
26
|
+
"comments": [
|
27
|
+
{
|
28
|
+
"line": 1,
|
29
|
+
"value": "# language: no"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"line": 2,
|
33
|
+
"value": "# Another comment"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"description": "",
|
37
|
+
"keyword": "Egenskap",
|
38
|
+
"line": 3,
|
39
|
+
"name": "Kjapp",
|
40
|
+
"uri": "test.feature",
|
41
|
+
"id": "kjapp"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"comments": [
|
45
|
+
{
|
46
|
+
"line": 1,
|
47
|
+
"value": "# language: no"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"line": 2,
|
51
|
+
"value": "# Yet another comment"
|
52
|
+
}
|
53
|
+
],
|
54
|
+
"description": "",
|
55
|
+
"keyword": "Egenskap",
|
56
|
+
"line": 3,
|
57
|
+
"name": "Kjappere",
|
58
|
+
"uri": "test.feature",
|
59
|
+
"id": "kjappere"
|
60
|
+
}
|
61
|
+
]
|
25
62
|
"""
|
26
63
|
|
27
64
|
Scenario: Feature with scenarios and outlines
|
@@ -70,212 +107,227 @@ Feature: JSON formatter
|
|
70
107
|
"""
|
71
108
|
Then the outputted JSON should be:
|
72
109
|
"""
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
"line": 6,
|
90
|
-
"name": "spirit"
|
91
|
-
}
|
92
|
-
],
|
93
|
-
"type": "scenario"
|
94
|
-
},
|
95
|
-
{
|
96
|
-
"description": "",
|
97
|
-
"keyword": "Scenario",
|
98
|
-
"line": 9,
|
99
|
-
"name": "_why",
|
100
|
-
"steps": [
|
101
|
-
{
|
102
|
-
"keyword": "Given ",
|
103
|
-
"line": 10,
|
104
|
-
"name": "chunky"
|
105
|
-
},
|
106
|
-
{
|
107
|
-
"keyword": "Then ",
|
108
|
-
"line": 11,
|
109
|
-
"name": "bacon"
|
110
|
-
}
|
111
|
-
],
|
112
|
-
"tags": [
|
113
|
-
{
|
114
|
-
"line": 8,
|
115
|
-
"name": "@two"
|
116
|
-
}
|
117
|
-
],
|
118
|
-
"type": "scenario"
|
119
|
-
},
|
120
|
-
{
|
121
|
-
"description": "",
|
122
|
-
"examples": [
|
123
|
-
{
|
124
|
-
"description": "",
|
125
|
-
"keyword": "Examples",
|
126
|
-
"line": 18,
|
127
|
-
"name": "Real life",
|
128
|
-
"rows": [
|
129
|
-
{
|
130
|
-
"cells": [
|
131
|
-
"boredom"
|
132
|
-
],
|
133
|
-
"line": 19
|
134
|
-
},
|
135
|
-
{
|
136
|
-
"cells": [
|
137
|
-
"airport"
|
138
|
-
],
|
139
|
-
"line": 20
|
140
|
-
},
|
141
|
-
{
|
142
|
-
"cells": [
|
143
|
-
"meeting"
|
144
|
-
],
|
145
|
-
"line": 21
|
146
|
-
}
|
147
|
-
],
|
148
|
-
"tags": [
|
149
|
-
{
|
150
|
-
"line": 17,
|
151
|
-
"name": "@five"
|
152
|
-
}
|
153
|
-
]
|
154
|
-
}
|
155
|
-
],
|
156
|
-
"keyword": "Scenario Outline",
|
157
|
-
"line": 14,
|
158
|
-
"name": "Life",
|
159
|
-
"steps": [
|
160
|
-
{
|
161
|
-
"keyword": "Given ",
|
162
|
-
"line": 15,
|
163
|
-
"name": "some <boredom>"
|
164
|
-
}
|
165
|
-
],
|
166
|
-
"tags": [
|
167
|
-
{
|
168
|
-
"line": 13,
|
169
|
-
"name": "@three"
|
170
|
-
},
|
171
|
-
{
|
172
|
-
"line": 13,
|
173
|
-
"name": "@four"
|
174
|
-
}
|
175
|
-
],
|
176
|
-
"type": "scenario_outline"
|
177
|
-
},
|
178
|
-
{
|
179
|
-
"description": "",
|
180
|
-
"keyword": "Scenario",
|
181
|
-
"line": 23,
|
182
|
-
"name": "who stole my mojo?",
|
183
|
-
"steps": [
|
184
|
-
{
|
185
|
-
"keyword": "When ",
|
186
|
-
"line": 24,
|
187
|
-
"name": "I was",
|
188
|
-
"rows": [
|
189
|
-
{
|
190
|
-
"cells": [
|
191
|
-
"asleep"
|
192
|
-
],
|
193
|
-
"line": 25
|
194
|
-
}
|
195
|
-
]
|
196
|
-
},
|
197
|
-
{
|
198
|
-
"doc_string": {
|
199
|
-
"content_type": "plaintext",
|
200
|
-
"line": 27,
|
201
|
-
"value": "innocent"
|
110
|
+
[
|
111
|
+
{
|
112
|
+
"uri": "test.feature",
|
113
|
+
"description": "",
|
114
|
+
"elements": [
|
115
|
+
{
|
116
|
+
"description": "",
|
117
|
+
"keyword": "Scenario",
|
118
|
+
"line": 4,
|
119
|
+
"id": "oh-hai;fujin",
|
120
|
+
"name": "Fujin",
|
121
|
+
"steps": [
|
122
|
+
{
|
123
|
+
"keyword": "Given ",
|
124
|
+
"line": 5,
|
125
|
+
"name": "wind"
|
202
126
|
},
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
127
|
+
{
|
128
|
+
"keyword": "Then ",
|
129
|
+
"line": 6,
|
130
|
+
"name": "spirit"
|
131
|
+
}
|
132
|
+
],
|
133
|
+
"type": "scenario"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"description": "",
|
137
|
+
"keyword": "Scenario",
|
138
|
+
"line": 9,
|
139
|
+
"id": "oh-hai;-why",
|
140
|
+
"name": "_why",
|
141
|
+
"steps": [
|
142
|
+
{
|
143
|
+
"keyword": "Given ",
|
144
|
+
"line": 10,
|
145
|
+
"name": "chunky"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"keyword": "Then ",
|
149
|
+
"line": 11,
|
150
|
+
"name": "bacon"
|
151
|
+
}
|
152
|
+
],
|
153
|
+
"tags": [
|
154
|
+
{
|
155
|
+
"line": 8,
|
156
|
+
"name": "@two"
|
157
|
+
}
|
158
|
+
],
|
159
|
+
"type": "scenario"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"description": "",
|
163
|
+
"examples": [
|
164
|
+
{
|
165
|
+
"description": "",
|
166
|
+
"keyword": "Examples",
|
167
|
+
"line": 18,
|
168
|
+
"id": "oh-hai;life;real-life",
|
169
|
+
"name": "Real life",
|
170
|
+
"rows": [
|
171
|
+
{
|
172
|
+
"id": "oh-hai;life;real-life;1",
|
173
|
+
"cells": [
|
174
|
+
"boredom"
|
175
|
+
],
|
176
|
+
"line": 19
|
177
|
+
},
|
178
|
+
{
|
179
|
+
"id": "oh-hai;life;real-life;2",
|
180
|
+
"cells": [
|
181
|
+
"airport"
|
182
|
+
],
|
183
|
+
"line": 20
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"id": "oh-hai;life;real-life;3",
|
187
|
+
"cells": [
|
188
|
+
"meeting"
|
189
|
+
],
|
190
|
+
"line": 21
|
191
|
+
}
|
192
|
+
],
|
193
|
+
"tags": [
|
194
|
+
{
|
195
|
+
"line": 17,
|
196
|
+
"name": "@five"
|
197
|
+
}
|
198
|
+
]
|
199
|
+
}
|
200
|
+
],
|
201
|
+
"keyword": "Scenario Outline",
|
202
|
+
"line": 14,
|
203
|
+
"id": "oh-hai;life",
|
204
|
+
"name": "Life",
|
205
|
+
"steps": [
|
206
|
+
{
|
207
|
+
"keyword": "Given ",
|
208
|
+
"line": 15,
|
209
|
+
"name": "some <boredom>"
|
210
|
+
}
|
211
|
+
],
|
212
|
+
"tags": [
|
213
|
+
{
|
214
|
+
"line": 13,
|
215
|
+
"name": "@three"
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"line": 13,
|
219
|
+
"name": "@four"
|
220
|
+
}
|
221
|
+
],
|
222
|
+
"type": "scenario_outline"
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"description": "",
|
226
|
+
"keyword": "Scenario",
|
227
|
+
"line": 23,
|
228
|
+
"id": "oh-hai;who-stole-my-mojo?",
|
229
|
+
"name": "who stole my mojo?",
|
230
|
+
"steps": [
|
231
|
+
{
|
232
|
+
"keyword": "When ",
|
233
|
+
"line": 24,
|
234
|
+
"name": "I was",
|
235
|
+
"rows": [
|
236
|
+
{
|
237
|
+
"cells": [
|
238
|
+
"asleep"
|
239
|
+
],
|
240
|
+
"line": 25
|
241
|
+
}
|
242
|
+
]
|
243
|
+
},
|
244
|
+
{
|
245
|
+
"doc_string": {
|
246
|
+
"content_type": "plaintext",
|
247
|
+
"line": 27,
|
248
|
+
"value": "innocent"
|
224
249
|
},
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
250
|
+
"keyword": "And ",
|
251
|
+
"line": 26,
|
252
|
+
"name": "so"
|
253
|
+
}
|
254
|
+
],
|
255
|
+
"type": "scenario"
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"comments": [
|
259
|
+
{
|
260
|
+
"line": 31,
|
261
|
+
"value": "# The"
|
262
|
+
}
|
263
|
+
],
|
264
|
+
"description": "",
|
265
|
+
"examples": [
|
266
|
+
{
|
267
|
+
"comments": [
|
268
|
+
{
|
269
|
+
"line": 36,
|
270
|
+
"value": "# comments"
|
271
|
+
},
|
272
|
+
{
|
273
|
+
"line": 37,
|
274
|
+
"value": "# everywhere"
|
275
|
+
}
|
276
|
+
],
|
277
|
+
"description": "",
|
278
|
+
"keyword": "Examples",
|
279
|
+
"line": 38,
|
280
|
+
"id": "oh-hai;with;an-example",
|
281
|
+
"name": "An example",
|
282
|
+
"rows": [
|
283
|
+
{
|
284
|
+
"id": "oh-hai;with;an-example;1",
|
285
|
+
"cells": [
|
286
|
+
"partout"
|
287
|
+
],
|
288
|
+
"comments": [
|
289
|
+
{
|
290
|
+
"line": 39,
|
291
|
+
"value": "# I mean"
|
292
|
+
}
|
293
|
+
],
|
294
|
+
"line": 40
|
295
|
+
}
|
296
|
+
]
|
297
|
+
}
|
298
|
+
],
|
299
|
+
"keyword": "Scenario Outline",
|
300
|
+
"line": 32,
|
301
|
+
"id": "oh-hai;with",
|
302
|
+
"name": "with",
|
303
|
+
"steps": [
|
304
|
+
{
|
305
|
+
"comments": [
|
306
|
+
{
|
307
|
+
"line": 33,
|
308
|
+
"value": "# all"
|
309
|
+
}
|
310
|
+
],
|
311
|
+
"keyword": "Then ",
|
312
|
+
"line": 34,
|
313
|
+
"name": "nice"
|
314
|
+
}
|
315
|
+
],
|
316
|
+
"type": "scenario_outline"
|
317
|
+
}
|
318
|
+
],
|
319
|
+
"keyword": "Feature",
|
320
|
+
"line": 2,
|
321
|
+
"id": "oh-hai",
|
322
|
+
"name": "OH HAI",
|
323
|
+
"tags": [
|
324
|
+
{
|
325
|
+
"line": 1,
|
326
|
+
"name": "@one"
|
327
|
+
}
|
328
|
+
]
|
329
|
+
}
|
330
|
+
]
|
279
331
|
"""
|
280
332
|
|
281
333
|
Scenario: Feature with Background
|
@@ -292,43 +344,48 @@ Feature: JSON formatter
|
|
292
344
|
"""
|
293
345
|
Then the outputted JSON should be:
|
294
346
|
"""
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
347
|
+
[
|
348
|
+
{
|
349
|
+
"uri": "test.feature",
|
350
|
+
"keyword": "Feature",
|
351
|
+
"name": "Kjapp",
|
352
|
+
"id": "kjapp",
|
353
|
+
"description": "",
|
354
|
+
"line": 1,
|
355
|
+
"elements": [
|
356
|
+
{
|
357
|
+
"type": "background",
|
358
|
+
"keyword": "Background",
|
359
|
+
"line": 3,
|
360
|
+
"name": "No idea what Kjapp means",
|
361
|
+
"description": "",
|
362
|
+
"steps": [
|
363
|
+
{
|
364
|
+
"keyword": "Given ",
|
365
|
+
"line": 4,
|
366
|
+
"name": "I Google it"
|
367
|
+
}
|
368
|
+
]
|
369
|
+
},
|
370
|
+
{
|
371
|
+
"type": "scenario",
|
372
|
+
"comments": [{"value": "# Writing JSON by hand sucks", "line": 6}],
|
373
|
+
"keyword": "Scenario",
|
374
|
+
"id": "kjapp;",
|
375
|
+
"name": "",
|
376
|
+
"description": "",
|
377
|
+
"line": 7,
|
378
|
+
"steps": [
|
379
|
+
{
|
380
|
+
"keyword": "Then ",
|
381
|
+
"name": "I think it means \"fast\"",
|
382
|
+
"line": 8
|
383
|
+
}
|
384
|
+
]
|
385
|
+
}
|
386
|
+
]
|
387
|
+
}
|
388
|
+
]
|
332
389
|
"""
|
333
390
|
|
334
391
|
Scenario: Feature with a description
|
@@ -347,21 +404,21 @@ Feature: JSON formatter
|
|
347
404
|
|
348
405
|
some pre-formatted stuff
|
349
406
|
|
350
|
-
Background: name
|
407
|
+
Background: b name
|
351
408
|
test
|
352
409
|
test
|
353
410
|
|
354
|
-
Scenario: name
|
411
|
+
Scenario: s name
|
355
412
|
test
|
356
413
|
test
|
357
414
|
|
358
|
-
Scenario Outline: name
|
415
|
+
Scenario Outline: s o name
|
359
416
|
test
|
360
417
|
test
|
361
418
|
|
362
419
|
Given <foo>
|
363
420
|
|
364
|
-
Examples: name
|
421
|
+
Examples: e name
|
365
422
|
test
|
366
423
|
test
|
367
424
|
| foo |
|
@@ -369,64 +426,73 @@ Feature: JSON formatter
|
|
369
426
|
"""
|
370
427
|
Then the outputted JSON should be:
|
371
428
|
"""
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
429
|
+
[
|
430
|
+
{
|
431
|
+
"uri": "test.feature",
|
432
|
+
"keyword": "Feature",
|
433
|
+
"id": "foo",
|
434
|
+
"name": "Foo",
|
435
|
+
"description": "one line \nanother line \n\n some pre-formatted stuff",
|
436
|
+
"line": 1,
|
437
|
+
"elements": [
|
438
|
+
{
|
439
|
+
"description": " test \n test",
|
440
|
+
"keyword": "Background",
|
441
|
+
"line": 7,
|
442
|
+
"name": "b name",
|
443
|
+
"type": "background"
|
444
|
+
},
|
445
|
+
{
|
446
|
+
"description": " test \n test",
|
447
|
+
"keyword": "Scenario",
|
448
|
+
"line": 11,
|
449
|
+
"id": "foo;s-name",
|
450
|
+
"name": "s name",
|
451
|
+
"type": "scenario"
|
452
|
+
},
|
453
|
+
{
|
454
|
+
"description": " test \n test",
|
455
|
+
"examples": [
|
456
|
+
{
|
457
|
+
"description": " test \n test",
|
458
|
+
"keyword": "Examples",
|
459
|
+
"line": 21,
|
460
|
+
"id": "foo;s-o-name;e-name",
|
461
|
+
"name": "e name",
|
462
|
+
"rows": [
|
463
|
+
{
|
464
|
+
"id": "foo;s-o-name;e-name;1",
|
465
|
+
"cells": [
|
466
|
+
"foo"
|
467
|
+
],
|
468
|
+
"line": 24
|
469
|
+
},
|
470
|
+
{
|
471
|
+
"id": "foo;s-o-name;e-name;2",
|
472
|
+
"cells": [
|
473
|
+
"table"
|
474
|
+
],
|
475
|
+
"line": 25
|
476
|
+
}
|
477
|
+
]
|
478
|
+
}
|
479
|
+
],
|
480
|
+
"keyword": "Scenario Outline",
|
481
|
+
"line": 15,
|
482
|
+
"id": "foo;s-o-name",
|
483
|
+
"name": "s o name",
|
484
|
+
"steps": [
|
485
|
+
{
|
486
|
+
"keyword": "Given ",
|
487
|
+
"line": 19,
|
488
|
+
"name": "<foo>"
|
489
|
+
}
|
490
|
+
],
|
491
|
+
"type": "scenario_outline"
|
492
|
+
}
|
493
|
+
]
|
494
|
+
}
|
495
|
+
]
|
430
496
|
"""
|
431
497
|
|
432
498
|
|