gherkin 2.12.2 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -15
- data/CONTRIBUTING.md +23 -0
- data/Gemfile +0 -3
- data/LICENSE +18 -17
- data/Makefile +65 -0
- data/README.md +9 -268
- data/Rakefile +17 -19
- data/bin/gherkin-generate-ast +21 -0
- data/bin/gherkin-generate-pickles +25 -0
- data/bin/gherkin-generate-tokens +12 -0
- data/gherkin-ruby.razor +218 -0
- data/gherkin.gemspec +22 -76
- data/lib/gherkin/ast_builder.rb +243 -0
- data/lib/gherkin/ast_node.rb +30 -0
- data/lib/gherkin/dialect.rb +58 -0
- data/lib/gherkin/errors.rb +45 -0
- data/lib/gherkin/gherkin-languages.json +2968 -0
- data/lib/gherkin/gherkin_line.rb +95 -0
- data/lib/gherkin/parser.rb +1910 -0
- data/lib/gherkin/pickles/compiler.rb +164 -0
- data/lib/gherkin/token.rb +18 -0
- data/lib/gherkin/token_formatter_builder.rb +39 -0
- data/lib/gherkin/token_matcher.rb +169 -0
- data/lib/gherkin/token_scanner.rb +40 -0
- data/spec/capture_warnings.rb +68 -0
- data/spec/coverage.rb +10 -0
- data/spec/gherkin/parser_spec.rb +146 -0
- metadata +60 -567
- data/.gitattributes +0 -2
- data/.mailmap +0 -2
- data/.rbenv-gemsets +0 -1
- data/.rspec +0 -1
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.yardopts +0 -5
- data/History.md +0 -881
- data/build_native_gems.sh +0 -7
- data/cucumber.yml +0 -5
- data/examples/parse_and_output_json.rb +0 -19
- data/ext/gherkin_lexer_ar/extconf.rb +0 -6
- data/ext/gherkin_lexer_ar/gherkin_lexer_ar.c +0 -1432
- data/ext/gherkin_lexer_bg/extconf.rb +0 -6
- data/ext/gherkin_lexer_bg/gherkin_lexer_bg.c +0 -1655
- data/ext/gherkin_lexer_bm/extconf.rb +0 -6
- data/ext/gherkin_lexer_bm/gherkin_lexer_bm.c +0 -1516
- data/ext/gherkin_lexer_ca/extconf.rb +0 -6
- data/ext/gherkin_lexer_ca/gherkin_lexer_ca.c +0 -1581
- data/ext/gherkin_lexer_cs/extconf.rb +0 -6
- data/ext/gherkin_lexer_cs/gherkin_lexer_cs.c +0 -1515
- data/ext/gherkin_lexer_cy_gb/extconf.rb +0 -6
- data/ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c +0 -1282
- data/ext/gherkin_lexer_da/extconf.rb +0 -6
- data/ext/gherkin_lexer_da/gherkin_lexer_da.c +0 -1298
- data/ext/gherkin_lexer_de/extconf.rb +0 -6
- data/ext/gherkin_lexer_de/gherkin_lexer_de.c +0 -1425
- data/ext/gherkin_lexer_el/extconf.rb +0 -6
- data/ext/gherkin_lexer_el/gherkin_lexer_el.c +0 -1919
- data/ext/gherkin_lexer_en/extconf.rb +0 -6
- data/ext/gherkin_lexer_en/gherkin_lexer_en.c +0 -1418
- data/ext/gherkin_lexer_en_au/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c +0 -1765
- data/ext/gherkin_lexer_en_lol/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c +0 -1177
- data/ext/gherkin_lexer_en_old/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_old/gherkin_lexer_en_old.c +0 -1309
- data/ext/gherkin_lexer_en_pirate/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c +0 -1471
- data/ext/gherkin_lexer_en_scouse/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c +0 -1634
- data/ext/gherkin_lexer_en_tx/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c +0 -1265
- data/ext/gherkin_lexer_eo/extconf.rb +0 -6
- data/ext/gherkin_lexer_eo/gherkin_lexer_eo.c +0 -1241
- data/ext/gherkin_lexer_es/extconf.rb +0 -6
- data/ext/gherkin_lexer_es/gherkin_lexer_es.c +0 -1399
- data/ext/gherkin_lexer_et/extconf.rb +0 -6
- data/ext/gherkin_lexer_et/gherkin_lexer_et.c +0 -1236
- data/ext/gherkin_lexer_fa/extconf.rb +0 -6
- data/ext/gherkin_lexer_fa/gherkin_lexer_fa.c +0 -1475
- data/ext/gherkin_lexer_fi/extconf.rb +0 -6
- data/ext/gherkin_lexer_fi/gherkin_lexer_fi.c +0 -1215
- data/ext/gherkin_lexer_fr/extconf.rb +0 -6
- data/ext/gherkin_lexer_fr/gherkin_lexer_fr.c +0 -1493
- data/ext/gherkin_lexer_gl/extconf.rb +0 -6
- data/ext/gherkin_lexer_gl/gherkin_lexer_gl.c +0 -1374
- data/ext/gherkin_lexer_he/extconf.rb +0 -6
- data/ext/gherkin_lexer_he/gherkin_lexer_he.c +0 -1374
- data/ext/gherkin_lexer_hi/extconf.rb +0 -6
- data/ext/gherkin_lexer_hi/gherkin_lexer_hi.c +0 -1848
- data/ext/gherkin_lexer_hr/extconf.rb +0 -6
- data/ext/gherkin_lexer_hr/gherkin_lexer_hr.c +0 -1323
- data/ext/gherkin_lexer_hu/extconf.rb +0 -6
- data/ext/gherkin_lexer_hu/gherkin_lexer_hu.c +0 -1376
- data/ext/gherkin_lexer_id/extconf.rb +0 -6
- data/ext/gherkin_lexer_id/gherkin_lexer_id.c +0 -1208
- data/ext/gherkin_lexer_is/extconf.rb +0 -6
- data/ext/gherkin_lexer_is/gherkin_lexer_is.c +0 -1376
- data/ext/gherkin_lexer_it/extconf.rb +0 -6
- data/ext/gherkin_lexer_it/gherkin_lexer_it.c +0 -1340
- data/ext/gherkin_lexer_ja/extconf.rb +0 -6
- data/ext/gherkin_lexer_ja/gherkin_lexer_ja.c +0 -1699
- data/ext/gherkin_lexer_kn/extconf.rb +0 -6
- data/ext/gherkin_lexer_kn/gherkin_lexer_kn.c +0 -1965
- data/ext/gherkin_lexer_ko/extconf.rb +0 -6
- data/ext/gherkin_lexer_ko/gherkin_lexer_ko.c +0 -1360
- data/ext/gherkin_lexer_lt/extconf.rb +0 -6
- data/ext/gherkin_lexer_lt/gherkin_lexer_lt.c +0 -1296
- data/ext/gherkin_lexer_lu/extconf.rb +0 -6
- data/ext/gherkin_lexer_lu/gherkin_lexer_lu.c +0 -1389
- data/ext/gherkin_lexer_lv/extconf.rb +0 -6
- data/ext/gherkin_lexer_lv/gherkin_lexer_lv.c +0 -1425
- data/ext/gherkin_lexer_nl/extconf.rb +0 -6
- data/ext/gherkin_lexer_nl/gherkin_lexer_nl.c +0 -1368
- data/ext/gherkin_lexer_no/extconf.rb +0 -6
- data/ext/gherkin_lexer_no/gherkin_lexer_no.c +0 -1311
- data/ext/gherkin_lexer_pa/extconf.rb +0 -6
- data/ext/gherkin_lexer_pa/gherkin_lexer_pa.c +0 -2160
- data/ext/gherkin_lexer_pl/extconf.rb +0 -6
- data/ext/gherkin_lexer_pl/gherkin_lexer_pl.c +0 -1738
- data/ext/gherkin_lexer_pt/extconf.rb +0 -6
- data/ext/gherkin_lexer_pt/gherkin_lexer_pt.c +0 -1711
- data/ext/gherkin_lexer_ro/extconf.rb +0 -6
- data/ext/gherkin_lexer_ro/gherkin_lexer_ro.c +0 -1427
- data/ext/gherkin_lexer_ru/extconf.rb +0 -6
- data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +0 -2071
- data/ext/gherkin_lexer_sk/extconf.rb +0 -6
- data/ext/gherkin_lexer_sk/gherkin_lexer_sk.c +0 -1739
- data/ext/gherkin_lexer_sr_cyrl/extconf.rb +0 -6
- data/ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c +0 -2112
- data/ext/gherkin_lexer_sr_latn/extconf.rb +0 -6
- data/ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c +0 -1567
- data/ext/gherkin_lexer_sv/extconf.rb +0 -6
- data/ext/gherkin_lexer_sv/gherkin_lexer_sv.c +0 -1324
- data/ext/gherkin_lexer_th/extconf.rb +0 -6
- data/ext/gherkin_lexer_th/gherkin_lexer_th.c +0 -2840
- data/ext/gherkin_lexer_tl/extconf.rb +0 -6
- data/ext/gherkin_lexer_tl/gherkin_lexer_tl.c +0 -2021
- data/ext/gherkin_lexer_tr/extconf.rb +0 -6
- data/ext/gherkin_lexer_tr/gherkin_lexer_tr.c +0 -1347
- data/ext/gherkin_lexer_tt/extconf.rb +0 -6
- data/ext/gherkin_lexer_tt/gherkin_lexer_tt.c +0 -1936
- data/ext/gherkin_lexer_uk/extconf.rb +0 -6
- data/ext/gherkin_lexer_uk/gherkin_lexer_uk.c +0 -1941
- data/ext/gherkin_lexer_uz/extconf.rb +0 -6
- data/ext/gherkin_lexer_uz/gherkin_lexer_uz.c +0 -1651
- data/ext/gherkin_lexer_vi/extconf.rb +0 -6
- data/ext/gherkin_lexer_vi/gherkin_lexer_vi.c +0 -1458
- data/ext/gherkin_lexer_zh_cn/extconf.rb +0 -6
- data/ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c +0 -1314
- data/ext/gherkin_lexer_zh_tw/extconf.rb +0 -6
- data/ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c +0 -1307
- data/features/.cucumber/stepdefs.json +0 -244
- data/features/escaped_pipes.feature +0 -8
- data/features/feature_parser.feature +0 -237
- data/features/json_formatter.feature +0 -498
- data/features/json_parser.feature +0 -331
- data/features/native_lexer.feature +0 -19
- data/features/parser_with_native_lexer.feature +0 -205
- data/features/pretty_formatter.feature +0 -17
- data/features/step_definitions/eyeball_steps.rb +0 -3
- data/features/step_definitions/gherkin_steps.rb +0 -29
- data/features/step_definitions/json_formatter_steps.rb +0 -30
- data/features/step_definitions/json_parser_steps.rb +0 -21
- data/features/step_definitions/pretty_formatter_steps.rb +0 -85
- data/features/steps_parser.feature +0 -46
- data/features/support/env.rb +0 -41
- data/install_mingw_os_x.sh +0 -5
- data/js/.npmignore +0 -1
- data/js/lib/gherkin/lexer/.npmignore +0 -0
- data/lib/gherkin.rb +0 -2
- data/lib/gherkin/README.md +0 -7
- data/lib/gherkin/c_lexer.rb +0 -17
- data/lib/gherkin/formatter/ansi_escapes.rb +0 -97
- data/lib/gherkin/formatter/argument.rb +0 -16
- data/lib/gherkin/formatter/escaping.rb +0 -15
- data/lib/gherkin/formatter/filter_formatter.rb +0 -150
- data/lib/gherkin/formatter/hashable.rb +0 -25
- data/lib/gherkin/formatter/json_formatter.rb +0 -133
- data/lib/gherkin/formatter/line_filter.rb +0 -26
- data/lib/gherkin/formatter/model.rb +0 -281
- data/lib/gherkin/formatter/pretty_formatter.rb +0 -245
- data/lib/gherkin/formatter/regexp_filter.rb +0 -21
- data/lib/gherkin/formatter/step_printer.rb +0 -21
- data/lib/gherkin/formatter/tag_count_formatter.rb +0 -47
- data/lib/gherkin/formatter/tag_filter.rb +0 -19
- data/lib/gherkin/i18n.json +0 -786
- data/lib/gherkin/i18n.rb +0 -176
- data/lib/gherkin/json_parser.rb +0 -177
- data/lib/gherkin/lexer/ar.rb +0 -1170
- data/lib/gherkin/lexer/bg.rb +0 -1382
- data/lib/gherkin/lexer/bm.rb +0 -1250
- data/lib/gherkin/lexer/ca.rb +0 -1310
- data/lib/gherkin/lexer/cs.rb +0 -1246
- data/lib/gherkin/lexer/cy_gb.rb +0 -1032
- data/lib/gherkin/lexer/da.rb +0 -1048
- data/lib/gherkin/lexer/de.rb +0 -1166
- data/lib/gherkin/lexer/el.rb +0 -1628
- data/lib/gherkin/lexer/en.rb +0 -1156
- data/lib/gherkin/lexer/en_au.rb +0 -1486
- data/lib/gherkin/lexer/en_lol.rb +0 -934
- data/lib/gherkin/lexer/en_old.rb +0 -1037
- data/lib/gherkin/lexer/en_pirate.rb +0 -1210
- data/lib/gherkin/lexer/en_scouse.rb +0 -1362
- data/lib/gherkin/lexer/en_tx.rb +0 -1016
- data/lib/gherkin/lexer/encoding.rb +0 -41
- data/lib/gherkin/lexer/eo.rb +0 -995
- data/lib/gherkin/lexer/es.rb +0 -1140
- data/lib/gherkin/lexer/et.rb +0 -990
- data/lib/gherkin/lexer/fa.rb +0 -1214
- data/lib/gherkin/lexer/fi.rb +0 -969
- data/lib/gherkin/lexer/fr.rb +0 -1228
- data/lib/gherkin/lexer/gl.rb +0 -1117
- data/lib/gherkin/lexer/he.rb +0 -1118
- data/lib/gherkin/lexer/hi.rb +0 -1559
- data/lib/gherkin/lexer/hr.rb +0 -1066
- data/lib/gherkin/lexer/hu.rb +0 -1118
- data/lib/gherkin/lexer/i18n_lexer.rb +0 -48
- data/lib/gherkin/lexer/id.rb +0 -963
- data/lib/gherkin/lexer/is.rb +0 -1120
- data/lib/gherkin/lexer/it.rb +0 -1086
- data/lib/gherkin/lexer/ja.rb +0 -1418
- data/lib/gherkin/lexer/kn.rb +0 -1672
- data/lib/gherkin/lexer/ko.rb +0 -1102
- data/lib/gherkin/lexer/lt.rb +0 -1045
- data/lib/gherkin/lexer/lu.rb +0 -1132
- data/lib/gherkin/lexer/lv.rb +0 -1166
- data/lib/gherkin/lexer/nl.rb +0 -1115
- data/lib/gherkin/lexer/no.rb +0 -1060
- data/lib/gherkin/lexer/pa.rb +0 -1852
- data/lib/gherkin/lexer/pl.rb +0 -1457
- data/lib/gherkin/lexer/pt.rb +0 -1430
- data/lib/gherkin/lexer/ro.rb +0 -1164
- data/lib/gherkin/lexer/ru.rb +0 -1766
- data/lib/gherkin/lexer/sk.rb +0 -1452
- data/lib/gherkin/lexer/sr_cyrl.rb +0 -1803
- data/lib/gherkin/lexer/sr_latn.rb +0 -1294
- data/lib/gherkin/lexer/sv.rb +0 -1070
- data/lib/gherkin/lexer/th.rb +0 -2492
- data/lib/gherkin/lexer/tl.rb +0 -1726
- data/lib/gherkin/lexer/tr.rb +0 -1092
- data/lib/gherkin/lexer/tt.rb +0 -1643
- data/lib/gherkin/lexer/uk.rb +0 -1646
- data/lib/gherkin/lexer/uz.rb +0 -1376
- data/lib/gherkin/lexer/vi.rb +0 -1198
- data/lib/gherkin/lexer/zh_cn.rb +0 -1058
- data/lib/gherkin/lexer/zh_tw.rb +0 -1052
- data/lib/gherkin/listener/event.rb +0 -45
- data/lib/gherkin/listener/formatter_listener.rb +0 -150
- data/lib/gherkin/native.rb +0 -7
- data/lib/gherkin/native/java.rb +0 -72
- data/lib/gherkin/native/null.rb +0 -5
- data/lib/gherkin/native/therubyracer.rb +0 -41
- data/lib/gherkin/parser/meta.txt +0 -5
- data/lib/gherkin/parser/parser.rb +0 -166
- data/lib/gherkin/parser/root.txt +0 -11
- data/lib/gherkin/parser/steps.txt +0 -4
- data/lib/gherkin/platform.rb +0 -13
- data/lib/gherkin/rubify.rb +0 -31
- data/lib/gherkin/tag_expression.rb +0 -63
- data/ragel/lexer.c.rl.erb +0 -454
- data/ragel/lexer.java.rl.erb +0 -219
- data/ragel/lexer.js.rl.erb +0 -322
- data/ragel/lexer.rb.rl.erb +0 -179
- data/ragel/lexer_common.rl.erb +0 -50
- data/spec/gherkin/c_lexer_spec.rb +0 -22
- data/spec/gherkin/fixtures/1.feature +0 -8
- data/spec/gherkin/fixtures/comments_in_table.feature +0 -9
- data/spec/gherkin/fixtures/complex.feature +0 -45
- data/spec/gherkin/fixtures/complex.json +0 -139
- data/spec/gherkin/fixtures/complex_for_filtering.feature +0 -60
- data/spec/gherkin/fixtures/complex_with_tags.feature +0 -61
- data/spec/gherkin/fixtures/dos_line_endings.feature +0 -45
- data/spec/gherkin/fixtures/examples_with_only_header.feature +0 -14
- data/spec/gherkin/fixtures/hantu_pisang.feature +0 -35
- data/spec/gherkin/fixtures/i18n_fr.feature +0 -14
- data/spec/gherkin/fixtures/i18n_fr2.feature +0 -8
- data/spec/gherkin/fixtures/i18n_no.feature +0 -7
- data/spec/gherkin/fixtures/i18n_pt1.feature +0 -44
- data/spec/gherkin/fixtures/i18n_pt2.feature +0 -4
- data/spec/gherkin/fixtures/i18n_pt3.feature +0 -4
- data/spec/gherkin/fixtures/i18n_pt4.feature +0 -4
- data/spec/gherkin/fixtures/i18n_zh-CN.feature +0 -9
- data/spec/gherkin/fixtures/iso-8859-1.feature +0 -6
- data/spec/gherkin/fixtures/issue_145.feature +0 -22
- data/spec/gherkin/fixtures/scenario_outline_with_tags.feature +0 -13
- data/spec/gherkin/fixtures/scenario_without_steps.feature +0 -5
- data/spec/gherkin/fixtures/simple_with_comments.feature +0 -7
- data/spec/gherkin/fixtures/simple_with_tags.feature +0 -11
- data/spec/gherkin/fixtures/with_bom.feature +0 -3
- data/spec/gherkin/fixtures/with_bom_and_language_spec.feature +0 -4
- data/spec/gherkin/formatter/ansi_escapes_spec.rb +0 -32
- data/spec/gherkin/formatter/filter_formatter_spec.rb +0 -204
- data/spec/gherkin/formatter/json_formatter_spec.rb +0 -179
- data/spec/gherkin/formatter/model_spec.rb +0 -28
- data/spec/gherkin/formatter/pretty_formatter_spec.rb +0 -184
- data/spec/gherkin/formatter/spaces.feature +0 -9
- data/spec/gherkin/formatter/step_printer_spec.rb +0 -55
- data/spec/gherkin/formatter/tabs.feature +0 -9
- data/spec/gherkin/formatter/tag_count_formatter_spec.rb +0 -30
- data/spec/gherkin/i18n_spec.rb +0 -256
- data/spec/gherkin/java_lexer_spec.rb +0 -20
- data/spec/gherkin/json_parser_spec.rb +0 -165
- data/spec/gherkin/lexer/i18n_lexer_spec.rb +0 -65
- data/spec/gherkin/native_lexer_spec.rb +0 -29
- data/spec/gherkin/parser/parser_spec.rb +0 -16
- data/spec/gherkin/rubify_spec.rb +0 -23
- data/spec/gherkin/sexp_recorder.rb +0 -59
- data/spec/gherkin/shared/doc_string_group.rb +0 -161
- data/spec/gherkin/shared/encoding_group.rb +0 -48
- data/spec/gherkin/shared/lexer_group.rb +0 -589
- data/spec/gherkin/shared/row_group.rb +0 -123
- data/spec/gherkin/shared/tags_group.rb +0 -52
- data/spec/gherkin/tag_expression_spec.rb +0 -146
- data/spec/spec_helper.rb +0 -94
- data/tasks/apidoc.rake +0 -32
- data/tasks/bench.rake +0 -184
- data/tasks/bench/feature_builder.rb +0 -49
- data/tasks/bench/null_listener.rb +0 -4
- data/tasks/compile.rake +0 -83
- data/tasks/cucumber.rake +0 -23
- data/tasks/gems.rake +0 -46
- data/tasks/ikvm.rake +0 -126
- data/tasks/ragel_task.rb +0 -124
- data/tasks/release.rake +0 -34
- data/tasks/rspec.rake +0 -6
- data/tasks/yard/default/layout/html/bubble_32x32.png +0 -0
- data/tasks/yard/default/layout/html/bubble_48x48.png +0 -0
- data/tasks/yard/default/layout/html/footer.erb +0 -5
- data/tasks/yard/default/layout/html/index.erb +0 -1
- data/tasks/yard/default/layout/html/layout.erb +0 -25
- data/tasks/yard/default/layout/html/logo.erb +0 -1
- data/tasks/yard/default/layout/html/setup.rb +0 -4
@@ -1,244 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"file_colon_line": "features/step_definitions/eyeball_steps.rb:1",
|
4
|
-
"flags": "",
|
5
|
-
"source": "^they have arrived$",
|
6
|
-
"steps": [
|
7
|
-
{
|
8
|
-
"args": [
|
9
|
-
|
10
|
-
],
|
11
|
-
"name": "they have arrived"
|
12
|
-
}
|
13
|
-
]
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"file_colon_line": "features/step_definitions/gherkin_steps.rb:1",
|
17
|
-
"flags": "",
|
18
|
-
"source": "^a \"(ruby|native)\" \"([^\\\"]*)\" parser$",
|
19
|
-
"steps": [
|
20
|
-
|
21
|
-
]
|
22
|
-
},
|
23
|
-
{
|
24
|
-
"file_colon_line": "features/step_definitions/gherkin_steps.rb:5",
|
25
|
-
"flags": "",
|
26
|
-
"source": "^the\\ following\\ text\\ is\\ parsed:$",
|
27
|
-
"steps": [
|
28
|
-
{
|
29
|
-
"args": [
|
30
|
-
|
31
|
-
],
|
32
|
-
"name": "the following text is parsed:"
|
33
|
-
}
|
34
|
-
]
|
35
|
-
},
|
36
|
-
{
|
37
|
-
"file_colon_line": "features/step_definitions/gherkin_steps.rb:9",
|
38
|
-
"flags": "",
|
39
|
-
"source": "^there\\ should\\ be\\ no\\ parse\\ errors$",
|
40
|
-
"steps": [
|
41
|
-
{
|
42
|
-
"args": [
|
43
|
-
|
44
|
-
],
|
45
|
-
"name": "there should be no parse errors"
|
46
|
-
}
|
47
|
-
]
|
48
|
-
},
|
49
|
-
{
|
50
|
-
"file_colon_line": "features/step_definitions/gherkin_steps.rb:13",
|
51
|
-
"flags": "",
|
52
|
-
"source": "^there should be a parse error on (line \\d+)$",
|
53
|
-
"steps": [
|
54
|
-
{
|
55
|
-
"args": [
|
56
|
-
{
|
57
|
-
"offset": 33,
|
58
|
-
"val": "line 1"
|
59
|
-
}
|
60
|
-
],
|
61
|
-
"name": "there should be a parse error on line 1"
|
62
|
-
}
|
63
|
-
]
|
64
|
-
},
|
65
|
-
{
|
66
|
-
"file_colon_line": "features/step_definitions/gherkin_steps.rb:17",
|
67
|
-
"flags": "",
|
68
|
-
"source": "^there should be parse errors on (lines .*)$",
|
69
|
-
"steps": [
|
70
|
-
{
|
71
|
-
"args": [
|
72
|
-
{
|
73
|
-
"offset": 32,
|
74
|
-
"val": "lines 1 and 2"
|
75
|
-
}
|
76
|
-
],
|
77
|
-
"name": "there should be parse errors on lines 1 and 2"
|
78
|
-
},
|
79
|
-
{
|
80
|
-
"args": [
|
81
|
-
{
|
82
|
-
"offset": 32,
|
83
|
-
"val": "lines 1 through 3"
|
84
|
-
}
|
85
|
-
],
|
86
|
-
"name": "there should be parse errors on lines 1 through 3"
|
87
|
-
},
|
88
|
-
{
|
89
|
-
"args": [
|
90
|
-
{
|
91
|
-
"offset": 32,
|
92
|
-
"val": "lines 10 and 17"
|
93
|
-
}
|
94
|
-
],
|
95
|
-
"name": "there should be parse errors on lines 10 and 17"
|
96
|
-
},
|
97
|
-
{
|
98
|
-
"args": [
|
99
|
-
{
|
100
|
-
"offset": 32,
|
101
|
-
"val": "lines 3 and 5"
|
102
|
-
}
|
103
|
-
],
|
104
|
-
"name": "there should be parse errors on lines 3 and 5"
|
105
|
-
},
|
106
|
-
{
|
107
|
-
"args": [
|
108
|
-
{
|
109
|
-
"offset": 32,
|
110
|
-
"val": "lines 5, 10 and 12"
|
111
|
-
}
|
112
|
-
],
|
113
|
-
"name": "there should be parse errors on lines 5, 10 and 12"
|
114
|
-
}
|
115
|
-
]
|
116
|
-
},
|
117
|
-
{
|
118
|
-
"file_colon_line": "features/step_definitions/json_formatter_steps.rb:13",
|
119
|
-
"flags": "",
|
120
|
-
"source": "^a JSON formatter$",
|
121
|
-
"steps": [
|
122
|
-
|
123
|
-
]
|
124
|
-
},
|
125
|
-
{
|
126
|
-
"file_colon_line": "features/step_definitions/json_formatter_steps.rb:18",
|
127
|
-
"flags": "",
|
128
|
-
"source": "^the outputted JSON should be:$",
|
129
|
-
"steps": [
|
130
|
-
{
|
131
|
-
"args": [
|
132
|
-
|
133
|
-
],
|
134
|
-
"name": "the outputted JSON should be:"
|
135
|
-
}
|
136
|
-
]
|
137
|
-
},
|
138
|
-
{
|
139
|
-
"file_colon_line": "features/step_definitions/json_parser_steps.rb:6",
|
140
|
-
"flags": "",
|
141
|
-
"source": "^a PrettyFormatter$",
|
142
|
-
"steps": [
|
143
|
-
|
144
|
-
]
|
145
|
-
},
|
146
|
-
{
|
147
|
-
"file_colon_line": "features/step_definitions/json_parser_steps.rb:11",
|
148
|
-
"flags": "",
|
149
|
-
"source": "^a JSON lexer$",
|
150
|
-
"steps": [
|
151
|
-
|
152
|
-
]
|
153
|
-
},
|
154
|
-
{
|
155
|
-
"file_colon_line": "features/step_definitions/json_parser_steps.rb:15",
|
156
|
-
"flags": "",
|
157
|
-
"source": "^the following JSON is parsed:$",
|
158
|
-
"steps": [
|
159
|
-
{
|
160
|
-
"args": [
|
161
|
-
|
162
|
-
],
|
163
|
-
"name": "the following JSON is parsed:"
|
164
|
-
}
|
165
|
-
]
|
166
|
-
},
|
167
|
-
{
|
168
|
-
"file_colon_line": "features/step_definitions/json_parser_steps.rb:19",
|
169
|
-
"flags": "",
|
170
|
-
"source": "^the outputted text should be:$",
|
171
|
-
"steps": [
|
172
|
-
{
|
173
|
-
"args": [
|
174
|
-
|
175
|
-
],
|
176
|
-
"name": "the outputted text should be:"
|
177
|
-
}
|
178
|
-
]
|
179
|
-
},
|
180
|
-
{
|
181
|
-
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:50",
|
182
|
-
"flags": "",
|
183
|
-
"source": "^I have Cucumber's source code next to Gherkin's$",
|
184
|
-
"steps": [
|
185
|
-
{
|
186
|
-
"args": [
|
187
|
-
|
188
|
-
],
|
189
|
-
"name": "I have Cucumber's source code next to Gherkin's"
|
190
|
-
}
|
191
|
-
]
|
192
|
-
},
|
193
|
-
{
|
194
|
-
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:55",
|
195
|
-
"flags": "",
|
196
|
-
"source": "^I find all of the \\.feature files$",
|
197
|
-
"steps": [
|
198
|
-
{
|
199
|
-
"args": [
|
200
|
-
|
201
|
-
],
|
202
|
-
"name": "I find all of the .feature files"
|
203
|
-
}
|
204
|
-
]
|
205
|
-
},
|
206
|
-
{
|
207
|
-
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:59",
|
208
|
-
"flags": "",
|
209
|
-
"source": "^I send each prettified original through the \"([^\"]*)\" machinery$",
|
210
|
-
"steps": [
|
211
|
-
{
|
212
|
-
"args": [
|
213
|
-
{
|
214
|
-
"offset": 45,
|
215
|
-
"val": "json"
|
216
|
-
}
|
217
|
-
],
|
218
|
-
"name": "I send each prettified original through the \"json\" machinery"
|
219
|
-
},
|
220
|
-
{
|
221
|
-
"args": [
|
222
|
-
{
|
223
|
-
"offset": 45,
|
224
|
-
"val": "pretty"
|
225
|
-
}
|
226
|
-
],
|
227
|
-
"name": "I send each prettified original through the \"pretty\" machinery"
|
228
|
-
}
|
229
|
-
]
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"file_colon_line": "features/step_definitions/pretty_formatter_steps.rb:83",
|
233
|
-
"flags": "",
|
234
|
-
"source": "^the machinery output should be identical to the prettified original$",
|
235
|
-
"steps": [
|
236
|
-
{
|
237
|
-
"args": [
|
238
|
-
|
239
|
-
],
|
240
|
-
"name": "the machinery output should be identical to the prettified original"
|
241
|
-
}
|
242
|
-
]
|
243
|
-
}
|
244
|
-
]
|
@@ -1,237 +0,0 @@
|
|
1
|
-
# language: en
|
2
|
-
Feature: Gherkin Feature lexer
|
3
|
-
In order to make it easy to control the Gherkin syntax
|
4
|
-
As a Gherkin developer bent on Gherkin world-domination
|
5
|
-
I want a feature lexer that uses a feature parser to
|
6
|
-
make all the syntax decisions for me
|
7
|
-
|
8
|
-
Background:
|
9
|
-
Given a "ruby" "root" parser
|
10
|
-
|
11
|
-
Scenario: Correctly formed feature
|
12
|
-
Given the following text is parsed:
|
13
|
-
"""
|
14
|
-
# Apologies to Bill Watterson
|
15
|
-
@cardboard_box @wip
|
16
|
-
Feature: Transmogrification
|
17
|
-
As a young boy with a hyperactive imagination
|
18
|
-
I want a cardboard box
|
19
|
-
In order to transform the ennui of suburban life into something
|
20
|
-
befitting my imagination
|
21
|
-
|
22
|
-
Background:
|
23
|
-
Given I have a transmogrifier
|
24
|
-
And I am a member of G.R.O.S.S
|
25
|
-
|
26
|
-
Scenario: Whoozit to whatzit transmogrification
|
27
|
-
Given I have a whoozit
|
28
|
-
When I put it in the transmogrifier
|
29
|
-
And I press the "transmogrify" button
|
30
|
-
Then I should have a whatzit
|
31
|
-
|
32
|
-
Scenario Outline: Imaginary Beings
|
33
|
-
Given I have a <boring being>
|
34
|
-
When I transmogrify it with the incantation:
|
35
|
-
\"\"\"
|
36
|
-
ALAKAZAM!
|
37
|
-
\"\"\"
|
38
|
-
Then I should have an <exciting being>
|
39
|
-
|
40
|
-
Examples:
|
41
|
-
| boring being | exciting being |
|
42
|
-
| Sparrow | Alicanto |
|
43
|
-
| Goldfish | Baldanders |
|
44
|
-
| Cow | Hsiao |
|
45
|
-
|
46
|
-
Scenario: Sense of humor detection
|
47
|
-
Given the following excerpt:
|
48
|
-
\"\"\"
|
49
|
-
WOMAN: Who are the Britons?
|
50
|
-
ARTHUR: Well, we all are. we're all Britons and I am your king.
|
51
|
-
WOMAN: I didn't know we had a king. I thought we were an autonomous
|
52
|
-
collective.
|
53
|
-
DENNIS: You're fooling yourself. We're living in a dictatorship.
|
54
|
-
A self-perpetuating autocracy in which the working classes--
|
55
|
-
WOMAN: Oh there you go, bringing class into it again.
|
56
|
-
DENNIS: That's what it's all about if only people would--
|
57
|
-
ARTHUR: Please, please good people. I am in haste. Who lives
|
58
|
-
in that castle?
|
59
|
-
\"\"\"
|
60
|
-
When I read it
|
61
|
-
Then I should be amused
|
62
|
-
"""
|
63
|
-
Then there should be no parse errors
|
64
|
-
|
65
|
-
Scenario: Keyword before feature
|
66
|
-
Given the following text is parsed:
|
67
|
-
"""
|
68
|
-
Scenario: Bullying my way to the head of the line
|
69
|
-
Given I am a big bully of a scenario
|
70
|
-
Then I should be caught by the syntax police(y)
|
71
|
-
|
72
|
-
Feature: Too timid to stand up for myself
|
73
|
-
"""
|
74
|
-
Then there should be parse errors on lines 1 through 3
|
75
|
-
|
76
|
-
Scenario: Multiple Features in file
|
77
|
-
Given the following text is parsed:
|
78
|
-
"""
|
79
|
-
Feature:
|
80
|
-
Scenario: Hi
|
81
|
-
Feature: Uh ohs
|
82
|
-
Scenario Outline:
|
83
|
-
Feature: This is silly
|
84
|
-
"""
|
85
|
-
Then there should be parse errors on lines 3 and 5
|
86
|
-
|
87
|
-
Scenario: Tag ends background and scenario
|
88
|
-
Given the following text is parsed:
|
89
|
-
"""
|
90
|
-
Feature: test feature
|
91
|
-
Background:
|
92
|
-
Given a something
|
93
|
-
@tag
|
94
|
-
And something else
|
95
|
-
|
96
|
-
@foo
|
97
|
-
Scenario: my scenario
|
98
|
-
@tag
|
99
|
-
Given this is a step
|
100
|
-
@oh_hai
|
101
|
-
And this is a horrible idea
|
102
|
-
Then it shouldn't work
|
103
|
-
"""
|
104
|
-
Then there should be parse errors on lines 5, 10 and 12
|
105
|
-
|
106
|
-
Scenario: Malformed Tables
|
107
|
-
Given the following text is parsed:
|
108
|
-
"""
|
109
|
-
Feature: Antiques Roadshow
|
110
|
-
Scenario Outline: Table
|
111
|
-
Given a <foo>
|
112
|
-
Then a <bar>
|
113
|
-
|
114
|
-
Examples:
|
115
|
-
| foo | bar |
|
116
|
-
| 42 | towel |
|
117
|
-
@hello
|
118
|
-
| 1 | prime |
|
119
|
-
|
120
|
-
Scenario: Table arguments
|
121
|
-
Given this step needs this table:
|
122
|
-
| foo | bar |
|
123
|
-
| one | two |
|
124
|
-
@tag
|
125
|
-
| aaa | bbb |
|
126
|
-
"""
|
127
|
-
Then there should be parse errors on lines 10 and 17
|
128
|
-
|
129
|
-
Scenario: Well-formed Tables
|
130
|
-
Given the following text is parsed:
|
131
|
-
"""
|
132
|
-
Feature: Row-by-row
|
133
|
-
|
134
|
-
Scenario: Tables with comments!
|
135
|
-
Given I can now comment out a row:
|
136
|
-
| Key | Value |
|
137
|
-
# | Yes | No |
|
138
|
-
# | Good | Bad |
|
139
|
-
| Good | Evil |
|
140
|
-
Then I am pleased by these things:
|
141
|
-
| Raindrops | Roses |
|
142
|
-
# | Whiskers | Kittens |
|
143
|
-
| Bright Copper | Kettles |
|
144
|
-
# | Warm woolen | Mittens |
|
145
|
-
| Also Oban | And Hendricks |
|
146
|
-
"""
|
147
|
-
Then there should be no parse errors
|
148
|
-
|
149
|
-
Scenario: Multiline keyword descriptions
|
150
|
-
Given the following text is parsed:
|
151
|
-
"""
|
152
|
-
Feature: Documentation is fun
|
153
|
-
Scenario Outline: With lots of docs
|
154
|
-
We need lots of embedded documentation for some reason
|
155
|
-
\"\"\" # Not interpreted as a pystring, just plain text
|
156
|
-
Oh hai
|
157
|
-
\"\"\"
|
158
|
-
|
159
|
-
La la la
|
160
|
-
|
161
|
-
Examples:
|
162
|
-
| one | two |
|
163
|
-
| foo | bar |
|
164
|
-
|
165
|
-
\"\"\"
|
166
|
-
Oh Hello
|
167
|
-
\"\"\"
|
168
|
-
|
169
|
-
# Body of the scenario outline starts below
|
170
|
-
Given <something>
|
171
|
-
And something <else>
|
172
|
-
|
173
|
-
# The real examples table
|
174
|
-
Examples:
|
175
|
-
| something | else |
|
176
|
-
| orange | apple |
|
177
|
-
"""
|
178
|
-
Then there should be no parse errors
|
179
|
-
|
180
|
-
Scenario: Scenario Outline with multiple Example groups
|
181
|
-
Given the following text is parsed:
|
182
|
-
"""
|
183
|
-
Feature: Outline Sample
|
184
|
-
|
185
|
-
Scenario: I have no steps
|
186
|
-
|
187
|
-
Scenario Outline: Test state
|
188
|
-
Given <state> without a table
|
189
|
-
Given <other_state> without a table
|
190
|
-
|
191
|
-
Examples: Rainbow colours
|
192
|
-
| state | other_state |
|
193
|
-
| missing | passing |
|
194
|
-
| passing | passing |
|
195
|
-
| failing | passing |
|
196
|
-
|
197
|
-
Examples: Only passing
|
198
|
-
| state | other_state |
|
199
|
-
| passing | passing |
|
200
|
-
"""
|
201
|
-
Then there should be no parse errors
|
202
|
-
|
203
|
-
Scenario: Multiple Scenario Outlines with multiline outline steps
|
204
|
-
Given the following text is parsed:
|
205
|
-
"""
|
206
|
-
Feature: Test
|
207
|
-
Scenario Outline: with step tables
|
208
|
-
Given I have the following fruits in my pantry
|
209
|
-
| name | quantity |
|
210
|
-
| cucumbers | 10 |
|
211
|
-
| strawberrys | 5 |
|
212
|
-
| apricots | 7 |
|
213
|
-
|
214
|
-
When I eat <number> <fruits> from the pantry
|
215
|
-
Then I should have <left> <fruits> in the pantry
|
216
|
-
|
217
|
-
Examples:
|
218
|
-
| number | fruits | left |
|
219
|
-
| 2 | cucumbers | 8 |
|
220
|
-
| 4 | strawberrys | 1 |
|
221
|
-
| 2 | apricots | 5 |
|
222
|
-
|
223
|
-
Scenario Outline: placeholder in a multiline string
|
224
|
-
Given my shopping list
|
225
|
-
\"\"\"
|
226
|
-
Must buy some <fruits>
|
227
|
-
\"\"\"
|
228
|
-
Then my shopping list should equal
|
229
|
-
\"\"\"
|
230
|
-
Must buy some cucumbers
|
231
|
-
\"\"\"
|
232
|
-
|
233
|
-
Examples:
|
234
|
-
| fruits |
|
235
|
-
| cucumbers |
|
236
|
-
"""
|
237
|
-
Then there should be no parse errors
|