├── .editorconfig ├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── .markdownlint.json ├── CHANGELOG.md ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── SECURITY.md ├── build.rs ├── src ├── keywords.rs ├── languages.json ├── lib.rs ├── parser.rs └── tagexpr.rs └── tests ├── bad.rs ├── cucumber.rs ├── features ├── de.feature ├── main.feature └── no.feature ├── fixtures └── data │ ├── bad │ ├── inconsistent_cell_count.feature │ ├── inconsistent_cell_count.feature.errors.ndjson │ ├── invalid_language.feature │ ├── invalid_language.feature.errors.ndjson │ ├── multiple_parser_errors.feature │ ├── multiple_parser_errors.feature.errors.ndjson │ ├── not_gherkin.feature │ ├── not_gherkin.feature.errors.ndjson │ ├── single_parser_error.feature │ ├── single_parser_error.feature.errors.ndjson │ ├── unexpected_eof.feature │ ├── unexpected_eof.feature.errors.ndjson │ ├── whitespace_in_tags.feature │ └── whitespace_in_tags.feature.errors.ndjson │ └── good │ ├── background.feature │ ├── background.feature.ast.ndjson │ ├── background.feature.pickles.ndjson │ ├── background.feature.source.ndjson │ ├── background.feature.tokens │ ├── complex_background.feature │ ├── complex_background.feature.ast.ndjson │ ├── complex_background.feature.pickles.ndjson │ ├── complex_background.feature.source.ndjson │ ├── complex_background.feature.tokens │ ├── datatables.feature │ ├── datatables.feature.ast.ndjson │ ├── datatables.feature.md │ ├── datatables.feature.md.ast.ndjson │ ├── datatables.feature.md.pickles.ndjson │ ├── datatables.feature.md.source.ndjson │ ├── datatables.feature.pickles.ndjson │ ├── datatables.feature.source.ndjson │ ├── datatables.feature.tokens │ ├── datatables_with_new_lines.feature │ ├── datatables_with_new_lines.feature.ast.ndjson │ ├── datatables_with_new_lines.feature.pickles.ndjson │ ├── datatables_with_new_lines.feature.source.ndjson │ ├── datatables_with_new_lines.feature.tokens │ ├── descriptions.feature │ ├── descriptions.feature.ast.ndjson │ ├── descriptions.feature.pickles.ndjson │ ├── descriptions.feature.source.ndjson │ ├── descriptions.feature.tokens │ ├── docstrings.feature │ ├── docstrings.feature.ast.ndjson │ ├── docstrings.feature.md │ ├── docstrings.feature.md.ast.ndjson │ ├── docstrings.feature.md.pickles.ndjson │ ├── docstrings.feature.md.source.ndjson │ ├── docstrings.feature.pickles.ndjson │ ├── docstrings.feature.source.ndjson │ ├── docstrings.feature.tokens │ ├── empty.feature │ ├── empty.feature.ast.ndjson │ ├── empty.feature.pickles.ndjson │ ├── empty.feature.source.ndjson │ ├── empty.feature.tokens │ ├── escaped_pipes.feature │ ├── escaped_pipes.feature.ast.ndjson │ ├── escaped_pipes.feature.pickles.ndjson │ ├── escaped_pipes.feature.source.ndjson │ ├── escaped_pipes.feature.tokens │ ├── example_token_multiple.feature │ ├── example_token_multiple.feature.ast.ndjson │ ├── example_token_multiple.feature.pickles.ndjson │ ├── example_token_multiple.feature.source.ndjson │ ├── example_token_multiple.feature.tokens │ ├── example_tokens_everywhere.feature │ ├── example_tokens_everywhere.feature.ast.ndjson │ ├── example_tokens_everywhere.feature.pickles.ndjson │ ├── example_tokens_everywhere.feature.source.ndjson │ ├── example_tokens_everywhere.feature.tokens │ ├── feature_with_comment.feature │ ├── feature_with_comment.feature.ast.ndjson │ ├── feature_with_comment_and_tag.feature │ ├── feature_with_comment_and_tag.feature.ast.ndjson │ ├── feature_with_tag.feature │ ├── feature_with_tag.feature.ast.ndjson │ ├── i18n_emoji.feature │ ├── i18n_emoji.feature.ast.ndjson │ ├── i18n_emoji.feature.pickles.ndjson │ ├── i18n_emoji.feature.source.ndjson │ ├── i18n_emoji.feature.tokens │ ├── i18n_fr.feature │ ├── i18n_fr.feature.ast.ndjson │ ├── i18n_fr.feature.pickles.ndjson │ ├── i18n_fr.feature.source.ndjson │ ├── i18n_fr.feature.tokens │ ├── i18n_no.feature │ ├── i18n_no.feature.ast.ndjson │ ├── i18n_no.feature.pickles.ndjson │ ├── i18n_no.feature.source.ndjson │ ├── i18n_no.feature.tokens │ ├── incomplete_background_1.feature │ ├── incomplete_background_1.feature.ast.ndjson │ ├── incomplete_background_1.feature.pickles.ndjson │ ├── incomplete_background_1.feature.source.ndjson │ ├── incomplete_background_1.feature.tokens │ ├── incomplete_background_2.feature │ ├── incomplete_background_2.feature.ast.ndjson │ ├── incomplete_background_2.feature.pickles.ndjson │ ├── incomplete_background_2.feature.source.ndjson │ ├── incomplete_background_2.feature.tokens │ ├── incomplete_feature_1.feature │ ├── incomplete_feature_1.feature.ast.ndjson │ ├── incomplete_feature_1.feature.pickles.ndjson │ ├── incomplete_feature_1.feature.source.ndjson │ ├── incomplete_feature_1.feature.tokens │ ├── incomplete_feature_2.feature │ ├── incomplete_feature_2.feature.ast.ndjson │ ├── incomplete_feature_2.feature.pickles.ndjson │ ├── incomplete_feature_2.feature.source.ndjson │ ├── incomplete_feature_2.feature.tokens │ ├── incomplete_feature_3.feature │ ├── incomplete_feature_3.feature.ast.ndjson │ ├── incomplete_feature_3.feature.pickles.ndjson │ ├── incomplete_feature_3.feature.source.ndjson │ ├── incomplete_feature_3.feature.tokens │ ├── incomplete_scenario.feature │ ├── incomplete_scenario.feature.ast.ndjson │ ├── incomplete_scenario.feature.pickles.ndjson │ ├── incomplete_scenario.feature.source.ndjson │ ├── incomplete_scenario.feature.tokens │ ├── incomplete_scenario_outline.feature │ ├── incomplete_scenario_outline.feature.ast.ndjson │ ├── incomplete_scenario_outline.feature.pickles.ndjson │ ├── incomplete_scenario_outline.feature.source.ndjson │ ├── incomplete_scenario_outline.feature.tokens │ ├── language.feature │ ├── language.feature.ast.ndjson │ ├── language.feature.pickles.ndjson │ ├── language.feature.source.ndjson │ ├── language.feature.tokens │ ├── minimal-example.feature │ ├── minimal-example.feature.ast.ndjson │ ├── minimal-example.feature.pickles.ndjson │ ├── minimal-example.feature.source.ndjson │ ├── minimal-example.feature.tokens │ ├── minimal.feature │ ├── minimal.feature.ast.ndjson │ ├── minimal.feature.md │ ├── minimal.feature.md.ast.ndjson │ ├── minimal.feature.md.pickles.ndjson │ ├── minimal.feature.md.source.ndjson │ ├── minimal.feature.pickles.ndjson │ ├── minimal.feature.source.ndjson │ ├── minimal.feature.tokens │ ├── misc.feature.md │ ├── misc.feature.md.ast.ndjson │ ├── misc.feature.md.pickles.ndjson │ ├── misc.feature.md.source.ndjson │ ├── padded_example.feature │ ├── padded_example.feature.ast.ndjson │ ├── padded_example.feature.pickles.ndjson │ ├── padded_example.feature.source.ndjson │ ├── padded_example.feature.tokens │ ├── readme_example.feature │ ├── readme_example.feature.ast.ndjson │ ├── readme_example.feature.pickles.ndjson │ ├── readme_example.feature.source.ndjson │ ├── readme_example.feature.tokens │ ├── rule.feature │ ├── rule.feature.ast.ndjson │ ├── rule.feature.pickles.ndjson │ ├── rule.feature.source.ndjson │ ├── rule.feature.tokens │ ├── rule_with_tag.feature │ ├── rule_with_tag.feature.ast.ndjson │ ├── rule_with_tag.feature.pickles.ndjson │ ├── rule_with_tag.feature.source.ndjson │ ├── rule_with_tag.feature.tokens │ ├── rule_without_name_and_description.feature │ ├── rule_without_name_and_description.feature.ast.ndjson │ ├── rule_without_name_and_description.feature.pickles.ndjson │ ├── rule_without_name_and_description.feature.source.ndjson │ ├── rule_without_name_and_description.feature.tokens │ ├── scenario_outline.feature │ ├── scenario_outline.feature.ast.ndjson │ ├── scenario_outline.feature.pickles.ndjson │ ├── scenario_outline.feature.source.ndjson │ ├── scenario_outline.feature.tokens │ ├── scenario_outline_no_newline.feature │ ├── scenario_outline_no_newline.feature.ast.ndjson │ ├── scenario_outline_no_newline.feature.pickles.ndjson │ ├── scenario_outline_no_newline.feature.source.ndjson │ ├── scenario_outline_no_newline.feature.tokens │ ├── scenario_outline_with_docstring.feature │ ├── scenario_outline_with_docstring.feature.ast.ndjson │ ├── scenario_outline_with_docstring.feature.pickles.ndjson │ ├── scenario_outline_with_docstring.feature.source.ndjson │ ├── scenario_outline_with_docstring.feature.tokens │ ├── scenario_outline_with_value_with_dollar_sign.feature │ ├── scenario_outline_with_value_with_dollar_sign.feature.ast.ndjson │ ├── scenario_outline_with_value_with_dollar_sign.feature.pickles.ndjson │ ├── scenario_outline_with_value_with_dollar_sign.feature.source.ndjson │ ├── scenario_outline_with_value_with_dollar_sign.feature.tokens │ ├── scenario_outlines_with_tags.feature │ ├── scenario_outlines_with_tags.feature.ast.ndjson │ ├── scenario_outlines_with_tags.feature.pickles.ndjson │ ├── scenario_outlines_with_tags.feature.source.ndjson │ ├── scenario_outlines_with_tags.feature.tokens │ ├── several_examples.feature │ ├── several_examples.feature.ast.ndjson │ ├── several_examples.feature.pickles.ndjson │ ├── several_examples.feature.source.ndjson │ ├── several_examples.feature.tokens │ ├── spaces_in_language.feature │ ├── spaces_in_language.feature.ast.ndjson │ ├── spaces_in_language.feature.pickles.ndjson │ ├── spaces_in_language.feature.source.ndjson │ ├── spaces_in_language.feature.tokens │ ├── tagged_feature_with_scenario_outline.feature │ ├── tagged_feature_with_scenario_outline.feature.ast.ndjson │ ├── tagged_feature_with_scenario_outline.feature.pickles.ndjson │ ├── tagged_feature_with_scenario_outline.feature.source.ndjson │ ├── tagged_feature_with_scenario_outline.feature.tokens │ ├── tags.feature │ ├── tags.feature.ast.ndjson │ ├── tags.feature.md │ ├── tags.feature.md.ast.ndjson │ ├── tags.feature.md.pickles.ndjson │ ├── tags.feature.md.source.ndjson │ ├── tags.feature.pickles.ndjson │ ├── tags.feature.source.ndjson │ ├── tags.feature.tokens │ ├── tags.md.ast.ndjson │ ├── tags.md.pickles.ndjson │ ├── tags.md.source.ndjson │ ├── very_long.feature │ ├── very_long.feature.ast.ndjson │ ├── very_long.feature.pickles.ndjson │ ├── very_long.feature.source.ndjson │ └── very_long.feature.tokens └── test.feature /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | max_line_length = 80 9 | 10 | [*.md] 11 | indent_style = space 12 | indent_size = 4 13 | max_line_length = off 14 | 15 | [*.rs] 16 | indent_style = space 17 | indent_size = 4 18 | 19 | [*.toml] 20 | indent_style = space 21 | indent_size = 4 22 | 23 | [*.{yaml,yml}] 24 | indent_style = space 25 | indent_size = 2 26 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | labels: ["enhancement", "github_actions", "k::dependencies"] 6 | schedule: 7 | interval: daily 8 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: ["main"] 6 | tags: ["v*"] 7 | pull_request: 8 | branches: ["main"] 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.ref }} 12 | cancel-in-progress: true 13 | 14 | env: 15 | RUST_BACKTRACE: 1 16 | 17 | jobs: 18 | 19 | ########################## 20 | # Linting and formatting # 21 | ########################## 22 | 23 | clippy: 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v4 27 | - uses: dtolnay/rust-toolchain@v1 28 | with: 29 | toolchain: stable 30 | components: clippy 31 | 32 | - run: cargo clippy --all-features -- -D warnings 33 | 34 | rustfmt: 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: actions/checkout@v4 38 | - uses: dtolnay/rust-toolchain@v1 39 | with: 40 | toolchain: nightly 41 | components: rustfmt 42 | 43 | - run: cargo fmt -- --check 44 | 45 | 46 | 47 | 48 | ########### 49 | # Testing # 50 | ########### 51 | 52 | feature: 53 | strategy: 54 | fail-fast: false 55 | matrix: 56 | feature: 57 | - 58 | - parser 59 | - serde 60 | - juniper 61 | runs-on: ubuntu-latest 62 | steps: 63 | - uses: actions/checkout@v4 64 | - uses: dtolnay/rust-toolchain@v1 65 | with: 66 | toolchain: nightly 67 | - uses: dtolnay/rust-toolchain@v1 68 | with: 69 | toolchain: stable 70 | 71 | - run: cargo +nightly update -Z minimal-versions 72 | 73 | - run: cargo check --no-default-features 74 | ${{ (matrix.feature != '' 75 | && format('--features {0}', matrix.feature)) 76 | || '' }} 77 | env: 78 | RUSTFLAGS: -D warnings 79 | 80 | msrv: 81 | name: MSRV 82 | strategy: 83 | fail-fast: false 84 | matrix: 85 | msrv: ["1.73.0"] 86 | os: 87 | - ubuntu 88 | - macOS 89 | - windows 90 | runs-on: ${{ matrix.os }}-latest 91 | steps: 92 | - uses: actions/checkout@v4 93 | - uses: dtolnay/rust-toolchain@v1 94 | with: 95 | toolchain: nightly 96 | - uses: dtolnay/rust-toolchain@v1 97 | with: 98 | toolchain: ${{ matrix.msrv }} 99 | 100 | - run: cargo +nightly update -Z minimal-versions 101 | 102 | - run: cargo check --all-features 103 | 104 | test: 105 | strategy: 106 | fail-fast: false 107 | matrix: 108 | os: 109 | - ubuntu 110 | - macOS 111 | - windows 112 | toolchain: 113 | - stable 114 | - beta 115 | - nightly 116 | runs-on: ${{ matrix.os }}-latest 117 | steps: 118 | - uses: actions/checkout@v4 119 | - uses: dtolnay/rust-toolchain@v1 120 | with: 121 | toolchain: ${{ matrix.toolchain }} 122 | components: rust-src 123 | 124 | - run: cargo install cargo-careful 125 | if: ${{ matrix.toolchain == 'nightly' }} 126 | 127 | - run: cargo ${{ (matrix.toolchain == 'nightly' && 'careful') || '' }} 128 | test --all-features 129 | 130 | 131 | 132 | 133 | ############# 134 | # Releasing # 135 | ############# 136 | 137 | publish: 138 | name: publish (crates.io) 139 | if: ${{ startsWith(github.ref, 'refs/tags/v') }} 140 | needs: ["release-github"] 141 | runs-on: ubuntu-latest 142 | steps: 143 | - uses: actions/checkout@v4 144 | - uses: dtolnay/rust-toolchain@v1 145 | with: 146 | toolchain: stable 147 | 148 | - run: cargo publish -p gherkin 149 | env: 150 | CARGO_REGISTRY_TOKEN: ${{ secrets.CRATESIO_TOKEN }} 151 | 152 | release-github: 153 | name: release (GitHub) 154 | if: ${{ startsWith(github.ref, 'refs/tags/v') }} 155 | needs: 156 | - clippy 157 | - feature 158 | - msrv 159 | - rustfmt 160 | - test 161 | runs-on: ubuntu-latest 162 | steps: 163 | - uses: actions/checkout@v4 164 | 165 | - name: Parse release version 166 | id: release 167 | run: echo "version=${GITHUB_REF#refs/tags/v}" 168 | >> $GITHUB_OUTPUT 169 | - name: Verify release version matches `gherkin` Cargo manifest 170 | run: | 171 | test "${{ steps.release.outputs.version }}" \ 172 | == "$(grep -m1 'version = "' Cargo.toml | cut -d'"' -f2)" 173 | 174 | - name: Parse CHANGELOG link 175 | id: changelog 176 | run: echo "link=${{ github.server_url }}/${{ github.repository }}/blob/v${{ steps.release.outputs.version }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.release.outputs.version }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)" 177 | >> $GITHUB_OUTPUT 178 | 179 | - name: Create GitHub release 180 | uses: softprops/action-gh-release@v2 181 | with: 182 | name: ${{ steps.release.outputs.version }} 183 | body: | 184 | [API docs](https://docs.rs/gherkin/${{ steps.release.outputs.version }}) 185 | [Changelog](${{ steps.changelog.outputs.link }}) 186 | prerelease: ${{ contains(steps.release.outputs.version, '-') }} 187 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": true, 3 | "MD004": { "style": "asterisk" } 4 | } 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | `gherkin` crate changelog 2 | ========================= 3 | 4 | All user visible changes to `gherkin` crate will be documented in this file. This project uses [Semantic Versioning 2.0.0]. 5 | 6 | 7 | 8 | 9 | ## [0.15.0] · 2024-??-?? (unreleased) 10 | [0.15.0]: /../../tree/v0.15.0 11 | 12 | [Diff](/../../compare/v0.14.0...v0.15.0) 13 | 14 | ### BC Breaks 15 | 16 | - Bump up [MSRV] to 1.73 to support newer versions of dependencies. ([todo]) 17 | 18 | ### Upgraded 19 | 20 | - [`juniper`] crate to 0.16 version. ([todo]) 21 | 22 | [todo]: /../../commit/todo 23 | 24 | 25 | 26 | 27 | ## [0.14.0] · 2023-07-14 28 | [0.14.0]: /../../tree/v0.14.0 29 | 30 | [Diff](/../../compare/v0.13.0...v0.14.0) 31 | 32 | ### BC Breaks 33 | 34 | - Bump up [MSRV] to 1.65 to support newer versions of dependencies. 35 | 36 | ### Upgraded 37 | 38 | - [`syn`] crate to 2.0 version. ([bdf31e7c]) 39 | - [`typed-builder`] crate to 0.15 version. ([bdf31e7c]) 40 | 41 | [bdf31e7c]: /../../commit/bdf31e7c093b6a3c74155d140125978cb3f6a4dc 42 | 43 | 44 | 45 | 46 | ## [0.13.0] · 2022-10-24 47 | [0.13.0]: /../../tree/v0.13.0 48 | 49 | [Diff](/../../compare/v0.12.0...v0.13.0) | [Milestone](/../../milestone/4) 50 | 51 | ### BC Breaks 52 | 53 | - Bump up [MSRV] to 1.62 to support newer versions of dependencies. 54 | 55 | ### Fixed 56 | 57 | - Parsing error on a `Feature` having comment and `Tag` simultaneously. ([#37], [#35]) 58 | 59 | [#35]: /../../issues/35 60 | [#37]: /../../pull/37 61 | 62 | 63 | 64 | 65 | ## [0.12.0] · 2022-03-28 66 | [0.12.0]: /../../tree/v0.12.0 67 | 68 | [Diff](/../../compare/v0.11.2...v0.12.0) | [Milestone](/../../milestone/2) 69 | 70 | ### BC Breaks 71 | 72 | - Made `name` field of `Background` required. ([#32]) 73 | - Make `table` field of `Examples` optional. ([#32]) 74 | 75 | ### Added 76 | 77 | - Support text after `Background` and `Examples` keywords. ([#31]) 78 | - `description` field to `Background`, `Examples`, `Rule` and `Scenario`. ([#32], [#10]) 79 | 80 | [#10]: /../../issues/10 81 | [#31]: /../../pull/31 82 | [#32]: /../../pull/32 83 | 84 | 85 | 86 | 87 | ## [0.11.2] · 2022-02-18 88 | [0.11.2]: /../../tree/v0.11.2 89 | 90 | [Diff](/../../compare/v0.11.1...v0.11.2) 91 | 92 | ### Fixed 93 | 94 | - Incorrect line numbers reporting. ([#33]) 95 | 96 | [#33]: /../../pull/33 97 | 98 | 99 | 100 | 101 | ## [0.11.1] · 2021-12-08 102 | [0.11.1]: /../../tree/v0.11.1 103 | 104 | [Diff](/../../compare/v0.11.0...v0.11.1) 105 | 106 | ### Fixed 107 | 108 | - Allowed keywords in `Feature`s `Description`. ([#30], [cucumber#175]) 109 | - Allowed characters in `Tag`s. ([#30], [cucumber#174]) 110 | - Comments on the same line with `Tag`s. ([#30]) 111 | - `Tag`s requiring whitespaces between them. ([#30]) 112 | - [Escaping][0111-1] in `TagOperation`. ([#30]) 113 | 114 | [#30]: /../../pull/30 115 | [cucumber#174]: https://github.com/cucumber-rs/cucumber/issues/174 116 | [cucumber#175]: https://github.com/cucumber-rs/cucumber/issues/175 117 | [0111-1]: https://github.com/cucumber/tag-expressions/tree/6f444830b23bd8e0c5a2617cd51b91bc2e05adde#escaping 118 | 119 | 120 | 121 | 122 | ## [0.11.0] · 2021-12-06 123 | [0.11.0]: /../../tree/v0.11.0 124 | 125 | [Diff](/../../compare/v0.10.2...v0.11.0) 126 | 127 | ### BC Breaks 128 | 129 | - Renamed crate from `gherkin_rust` to just `gherkin`. ([d8803b80]) 130 | - Yank [0.10.2] version, as it's appeared to be backwards incompatible. 131 | 132 | [d8803b80]: /../../commit/d8803b808eb5bd2684b9dc7c868a9637a0398100 133 | 134 | 135 | 136 | 137 | ## [0.10.2] · 2021-11-29 138 | [0.10.2]: /../../tree/v0.10.2 139 | 140 | [Diff](/../../compare/v0.10.1...v0.10.2) 141 | 142 | ### Added 143 | 144 | - Support of multiple `Examples` in `Scenario Outline`. ([#29]) 145 | 146 | [#29]: /../../pull/29 147 | 148 | 149 | 150 | 151 | [`syn`]: https://docs.rs/syn 152 | [`typed-builder`]: https://docs.rs/typed-builder 153 | [MSRV]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field 154 | [Semantic Versioning 2.0.0]: https://semver.org 155 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "gherkin" 3 | version = "0.14.0" 4 | edition = "2018" 5 | rust-version = "1.73" 6 | description = """\ 7 | Pure Rust implementation of Gherkin language (`.feature` file) for \ 8 | Cucumber testing framework.\ 9 | """ 10 | license = "MIT OR Apache-2.0" 11 | authors = ["Brendan Molloy "] 12 | documentation = "https://docs.rs/gherkin" 13 | homepage = "https://github.com/cucumber-rs/gherkin" 14 | repository = "https://github.com/cucumber-rs/gherkin" 15 | readme = "README.md" 16 | categories = ["compilers", "parser-implementations"] 17 | keywords = ["gherkin", "cucumber", "cucumber-gherkin", "testing", "bdd"] 18 | include = ["/src/", "/build.rs", "/tests/cucumber.rs", "/LICENSE-*", "/README.md", "/CHANGELOG.md"] 19 | 20 | [package.metadata.docs.rs] 21 | all-features = true 22 | rustdoc-args = ["--cfg", "docsrs"] 23 | 24 | [features] 25 | default = ["parser"] 26 | # Enables ability to parse AST. 27 | parser = ["dep:typed-builder"] 28 | 29 | [dependencies] 30 | peg = "0.6.3" 31 | textwrap = "0.16" 32 | thiserror = "2.0" 33 | 34 | # "parser" feature dependencies. 35 | typed-builder = { version = "0.21", optional = true } 36 | 37 | # "serde" feature enables ability to serialize/deserialize AST. 38 | serde = { version = "1.0.103", features = ["derive"], optional = true } 39 | 40 | # "juniper" feature enables ability to use AST as GraphQL types. 41 | juniper = { version = "0.16", default-features = false, optional = true } 42 | 43 | [build-dependencies] 44 | heck = "0.5" 45 | quote = "1.0" 46 | serde = { version = "1.0", features = ["derive"] } 47 | serde_json = "1.0" 48 | syn = "2.0" 49 | 50 | [dev-dependencies] 51 | cucumber = "0.21" 52 | futures = "0.3.5" 53 | serde_json = "1.0.78" 54 | 55 | [[test]] 56 | name = "cucumber" 57 | harness = false 58 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2025 Brendan Molloy 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Gherkin language for Rust 2 | ========================= 3 | 4 | [![crates.io](https://img.shields.io/crates/v/gherkin.svg "crates.io")](https://crates.io/crates/gherkin) 5 | [![Rust 1.73+](https://img.shields.io/badge/rustc-1.73+-lightgray.svg "Rust 1.73+")](https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html) 6 | [![Unsafe Forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg "Unsafe forbidden")](https://github.com/rust-secure-code/safety-dance)\ 7 | [![CI](https://github.com/cucumber-rs/gherkin/actions/workflows/ci.yml/badge.svg?branch=main "CI")](https://github.com/cucumber-rs/gherkin/actions?query=workflow%3ACI+branch%3Amain) 8 | [![Rust docs](https://docs.rs/gherkin/badge.svg "Rust docs")](https://docs.rs/gherkin) 9 | 10 | [Changelog](https://github.com/cucumber-rs/gherkin/blob/main/CHANGELOG.md) 11 | 12 | A pure [Rust] implementation of the [Gherkin] (`.feature` file) language for the [Cucumber] testing framework. 13 | 14 | If you want to run [Cucumber] tests in [Rust], try [`cucumber` crate](https://github.com/cucumber-rs/cucumber)! 15 | 16 | 17 | 18 | 19 | ## Usage 20 | 21 | ```toml 22 | [dependencies] 23 | gherkin = "0.14" 24 | ``` 25 | 26 | 27 | 28 | 29 | ## Further information 30 | 31 | For a detailed description of [Gherkin] usage, you can refer to upstream [Cucumber] documentation. 32 | 33 | 34 | ### Upstream documentation 35 | 36 | 1. for Cucumber **developers**: 37 | * [the Gherkin readme](https://github.com/cucumber/gherkin/blob/main/README.md) 38 | * [the Gherkin contributing guide](https://github.com/cucumber/gherkin/blob/main/CONTRIBUTING.md) 39 | 1. for Cucumber **users**: 40 | * [the Cucumber user documentation](https://cucumber.io/docs/cucumber). 41 | * [the Gherkin user documentation](https://cucumber.io/docs/gherkin). 42 | 43 | 44 | 45 | 46 | ## License 47 | 48 | This project is licensed under either of 49 | 50 | * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or ) 51 | * MIT license ([LICENSE-MIT](LICENSE-MIT) or ) 52 | 53 | at your option. 54 | 55 | [Original source](https://github.com/cucumber/gherkin/blob/main/gherkin-languages.json) of `src/languages.json` is used under the [MIT license](https://github.com/cucumber/gherkin/blob/main/LICENSE). 56 | 57 | 58 | 59 | 60 | [Cucumber]: https://cucumber.io 61 | [Gherkin]: https://cucumber.io/docs/gherkin 62 | [Rust]: https://www.rust-lang.org 63 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | Security Policy 2 | =============== 3 | 4 | Security policy of [`gherkin`] crate. 5 | 6 | 7 | 8 | 9 | ## Supported versions 10 | 11 | Before going `1.0`, the [`gherkin`] crate maintains only the most recent minor release. 12 | 13 | 14 | 15 | 16 | ## Reporting a vulnerability 17 | 18 | Security is of the highest importance and all security vulnerabilities or suspected security vulnerabilities should be reported to this project privately, to minimize attacks against current users of [`gherkin`] crate before they are fixed. Vulnerabilities will be investigated and patched on the next patch (or minor) release as soon as possible. This information could be kept entirely internal to the project. 19 | 20 | 21 | ### Private disclosure process 22 | 23 | > **WARNING:** Do not file public issues on GitHub for security vulnerabilities. 24 | 25 | To report a vulnerability or a security-related issue, please use [GitHub private vulnerability reporting][11] on the [Security Advisories page][1] and fill the vulnerability details. It will be addressed within a week, including a detailed plan to investigate the issue and any potential workarounds to perform in the meantime. Do not report non-security-impacting bugs through this channel, use [GitHub issues][2] instead. 26 | 27 | 28 | ### Public disclosure process 29 | 30 | Project maintainers publish a [public advisory][1] to the community [via GitHub][12]. 31 | 32 | 33 | 34 | 35 | [`gherkin`]: https://docs.rs/gherkin 36 | 37 | [1]: /../../security/advisories 38 | [2]: /../../issues 39 | [11]: https://docs.github.com/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability 40 | [12]: https://docs.github.com/code-security/security-advisories/repository-security-advisories/publishing-a-repository-security-advisory#about-publishing-a-security-advisory 41 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | use std::{collections::BTreeMap, path::Path}; 2 | 3 | use quote::{__private::Span, quote}; 4 | use syn::Ident; 5 | 6 | #[derive(Debug, serde::Deserialize)] 7 | #[serde(rename_all = "camelCase")] 8 | struct Data { 9 | and: Vec, 10 | background: Vec, 11 | but: Vec, 12 | examples: Vec, 13 | feature: Vec, 14 | given: Vec, 15 | // name: String, 16 | // native: String, 17 | rule: Vec, 18 | scenario: Vec, 19 | scenario_outline: Vec, 20 | then: Vec, 21 | when: Vec, 22 | } 23 | 24 | fn main() { 25 | use heck::ToShoutySnakeCase as _; 26 | 27 | let out_dir = std::env::var_os("OUT_DIR").unwrap(); 28 | let out_dir = Path::new(&out_dir); 29 | 30 | let f = std::fs::read_to_string("./src/languages.json").unwrap(); 31 | let langs: BTreeMap = serde_json::from_str(&f).unwrap(); 32 | 33 | let mut keyword_defs = vec![]; 34 | let mut match_arms = vec![]; 35 | 36 | for (lang, data) in langs { 37 | let lang_upper = lang.to_shouty_snake_case(); 38 | let lang_ident: Ident = Ident::new(&lang_upper, Span::call_site()); 39 | 40 | let Data { 41 | and, 42 | background, 43 | but, 44 | examples, 45 | feature, 46 | given, 47 | // name, 48 | // native, 49 | rule, 50 | scenario, 51 | scenario_outline, 52 | then, 53 | when, 54 | } = data; 55 | 56 | let keyword_def = quote! { 57 | const #lang_ident: Keywords<'static> = Keywords { 58 | feature: &[#(#feature),*], 59 | background: &[#(#background),*], 60 | rule: &[#(#rule),*], 61 | scenario: &[#(#scenario),*], 62 | scenario_outline: &[#(#scenario_outline),*], 63 | examples: &[#(#examples),*], 64 | given: &[#(#given),*], 65 | when: &[#(#when),*], 66 | then: &[#(#then),*], 67 | and: &[#(#and),*], 68 | but: &[#(#but),*], 69 | }; 70 | }; 71 | 72 | let match_arm = quote! { 73 | #lang => Some(#lang_ident) 74 | }; 75 | 76 | keyword_defs.push(keyword_def); 77 | match_arms.push(match_arm); 78 | } 79 | 80 | let keyword_defs = quote! { 81 | #(#keyword_defs)* 82 | } 83 | .to_string(); 84 | 85 | let match_arms = quote! { 86 | match key { 87 | #(#match_arms),*, 88 | _ => None 89 | } 90 | } 91 | .to_string(); 92 | 93 | std::fs::write(out_dir.join("keywords.gen.rs"), keyword_defs).unwrap(); 94 | std::fs::write(out_dir.join("match.gen.rs"), match_arms).unwrap(); 95 | } 96 | -------------------------------------------------------------------------------- /src/keywords.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2025 Brendan Molloy 2 | // 3 | // Licensed under the Apache License, Version 2.0 or the MIT license 5 | // , at your 6 | // option. This file may not be copied, modified, or distributed 7 | // except according to those terms. 8 | 9 | use std::ops::Deref; 10 | 11 | #[derive(Debug, Clone)] 12 | pub(crate) struct Keywords<'a> { 13 | pub feature: &'a [&'a str], 14 | pub background: &'a [&'a str], 15 | pub rule: &'a [&'a str], 16 | pub scenario: &'a [&'a str], 17 | pub scenario_outline: &'a [&'a str], 18 | pub examples: &'a [&'a str], 19 | pub given: &'a [&'a str], 20 | pub when: &'a [&'a str], 21 | pub then: &'a [&'a str], 22 | pub and: &'a [&'a str], 23 | pub but: &'a [&'a str], 24 | } 25 | 26 | impl<'a> Keywords<'a> { 27 | pub fn get(key: &str) -> Option> { 28 | let result = include!(concat!(env!("OUT_DIR"), "/match.gen.rs")); 29 | 30 | if let Some(result) = result { 31 | return Some(result); 32 | } 33 | 34 | Some(match key { 35 | "formal" => FORMAL_SPEC_KEYWORDS, 36 | _ => return None, 37 | }) 38 | } 39 | 40 | pub fn all(&self) -> Vec<&'a str> { 41 | let mut v = [ 42 | self.feature, 43 | self.background, 44 | self.rule, 45 | self.scenario, 46 | self.scenario_outline, 47 | self.examples, 48 | self.given, 49 | self.when, 50 | self.then, 51 | self.and, 52 | self.but, 53 | ] 54 | .iter() 55 | .flat_map(|s| s.iter().map(Deref::deref)) 56 | .collect::>(); 57 | 58 | v.sort_unstable(); 59 | 60 | v 61 | } 62 | 63 | pub fn excluded_feature(&'a self) -> Vec<&'a str> { 64 | [ 65 | self.background, 66 | self.rule, 67 | self.scenario, 68 | self.scenario_outline, 69 | ] 70 | .concat() 71 | } 72 | 73 | pub fn excluded_rule(&'a self) -> Vec<&'a str> { 74 | [self.background, self.scenario, self.scenario_outline].concat() 75 | } 76 | 77 | pub fn excluded_background(&'a self) -> Vec<&'a str> { 78 | [ 79 | self.scenario, 80 | self.scenario_outline, 81 | self.given, 82 | self.when, 83 | self.then, 84 | self.and, 85 | self.but, 86 | ] 87 | .concat() 88 | } 89 | 90 | pub fn excluded_scenario(&'a self) -> Vec<&'a str> { 91 | [ 92 | self.scenario, 93 | self.scenario_outline, 94 | self.given, 95 | self.when, 96 | self.then, 97 | self.and, 98 | self.but, 99 | ] 100 | .concat() 101 | } 102 | 103 | pub fn excluded_scenario_outline(&'a self) -> Vec<&'a str> { 104 | [ 105 | self.scenario, 106 | self.scenario_outline, 107 | self.given, 108 | self.when, 109 | self.then, 110 | self.and, 111 | self.but, 112 | ] 113 | .concat() 114 | } 115 | 116 | pub fn excluded_examples(&'a self) -> Vec<&'a str> { 117 | let mut r = [ 118 | self.scenario, 119 | self.scenario_outline, 120 | self.given, 121 | self.when, 122 | self.then, 123 | self.and, 124 | self.but, 125 | ] 126 | .concat(); 127 | r.push("|"); 128 | r 129 | } 130 | } 131 | 132 | impl Default for Keywords<'_> { 133 | fn default() -> Self { 134 | EN 135 | } 136 | } 137 | 138 | const FORMAL_SPEC_KEYWORDS: Keywords<'static> = Keywords { 139 | feature: &["Section"], 140 | background: &["Context"], 141 | rule: &["Rule"], 142 | scenario: &["Proof", "Evidence"], 143 | scenario_outline: &["Demonstration"], 144 | examples: &["Examples"], 145 | given: &["Given"], 146 | when: &["When"], 147 | then: &["Then"], 148 | and: &["*", "And"], 149 | but: &["But"], 150 | }; 151 | 152 | include!(concat!(env!("OUT_DIR"), "/keywords.gen.rs")); 153 | -------------------------------------------------------------------------------- /src/tagexpr.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020-2025 Brendan Molloy 2 | // 3 | // Licensed under the Apache License, Version 2.0 or the MIT license 5 | // , at your 6 | // option. This file may not be copied, modified, or distributed 7 | // except according to those terms. 8 | 9 | //! ### Tag expressions 10 | //! 11 | //! You can read about tag expressions in the [Cucumber documentation](https://cucumber.io/docs/cucumber/api#tag-expressions). 12 | //! 13 | //! This implements the parsing apparatus for these expressions so that other crates like [`cucumber`](https://github.com/cucumber-rs/cucumber) 14 | //! may take advantage of them. 15 | //! 16 | //! #### Usage 17 | //! 18 | //! ``` 19 | //! use gherkin::tagexpr::TagOperation; 20 | //! # fn main() -> Result<(), peg::error::ParseError> { 21 | //! let op: TagOperation = "@a and @b".parse()?; 22 | //! # Ok(()) 23 | //! # } 24 | //! ``` 25 | 26 | use std::str::FromStr; 27 | 28 | impl FromStr for TagOperation { 29 | type Err = peg::error::ParseError; 30 | 31 | fn from_str(s: &str) -> Result { 32 | crate::parser::gherkin_parser::tag_operation(s, &Default::default()) 33 | } 34 | } 35 | 36 | /// A parsed tree of operations for Gherkin tags. 37 | #[derive(Debug, Clone)] 38 | pub enum TagOperation { 39 | And(Box, Box), 40 | Or(Box, Box), 41 | Not(Box), 42 | Tag(String), 43 | } 44 | 45 | #[cfg(test)] 46 | mod tests { 47 | use super::*; 48 | 49 | #[test] 50 | fn parse_tag_expr1() { 51 | let foo: TagOperation = "@foo and @bar".parse().unwrap_or_else(|e| panic!("{}", e)); 52 | println!("{:#?}", foo); 53 | } 54 | #[test] 55 | fn parse_tag_expr2() { 56 | let foo: TagOperation = "@foo or @bar".parse().unwrap_or_else(|e| panic!("{}", e)); 57 | println!("{:#?}", foo); 58 | } 59 | 60 | #[test] 61 | fn parse_tag_expr1b() { 62 | let foo: TagOperation = "(@foo and @bar)" 63 | .parse() 64 | .unwrap_or_else(|e| panic!("{}", e)); 65 | println!("{:#?}", foo); 66 | } 67 | #[test] 68 | fn parse_tag_expr2b() { 69 | let foo: TagOperation = "(@foo or @bar)".parse().unwrap_or_else(|e| panic!("{}", e)); 70 | println!("{:#?}", foo); 71 | } 72 | 73 | #[test] 74 | fn parse_tag_expr3() { 75 | let foo: TagOperation = "not @fat".parse().unwrap_or_else(|e| panic!("{}", e)); 76 | println!("{:#?}", foo); 77 | } 78 | 79 | #[test] 80 | fn parse_tag_expr4() { 81 | let foo: Result = "@foo not @bar".parse(); 82 | assert!(foo.is_err()); 83 | } 84 | 85 | #[test] 86 | fn parse_tag_expr5() { 87 | let foo: TagOperation = "(not @foo) and not (@haha or @bar)" 88 | .parse() 89 | .unwrap_or_else(|e| panic!("{}", e)); 90 | println!("{:#?}", foo); 91 | } 92 | 93 | #[test] 94 | fn parse_tag_expr6() { 95 | let foo: TagOperation = "not @foo and not @haha or @bar" 96 | .parse() 97 | .unwrap_or_else(|e| panic!("{}", e)); 98 | println!("{:#?}", foo); 99 | } 100 | 101 | #[test] 102 | fn parse_tag_expr7() { 103 | let foo: TagOperation = "not (@a or @b) and (@c or not @d)" 104 | .parse() 105 | .unwrap_or_else(|e| panic!("{}", e)); 106 | println!("{:#?}", foo); 107 | } 108 | 109 | #[test] 110 | fn parse_tag_expr8() { 111 | let foo: TagOperation = "@a or @b and @c or not @d" 112 | .parse() 113 | .unwrap_or_else(|e| panic!("{}", e)); 114 | println!("{:#?}", foo); 115 | } 116 | 117 | #[test] 118 | fn parse_tag_expr9() { 119 | let foo: TagOperation = "@bar\\\\\\)\\ \\(" 120 | .parse() 121 | .unwrap_or_else(|e| panic!("{}", e)); 122 | println!("{:#?}", foo); 123 | } 124 | 125 | #[test] 126 | fn parse_tag_expr10() { 127 | let foo: TagOperation = "(@foo and @bar\\))" 128 | .parse() 129 | .unwrap_or_else(|e| panic!("{}", e)); 130 | println!("{:#?}", foo); 131 | } 132 | 133 | #[test] 134 | fn parse_tag_expr11() { 135 | let foo: TagOperation = "not (@\\)a or @\\(b) and (@c or not @d)" 136 | .parse() 137 | .unwrap_or_else(|e| panic!("{}", e)); 138 | println!("{:#?}", foo); 139 | } 140 | 141 | #[test] 142 | fn parse_tag_expr12() { 143 | let err = "@bar\\".parse::().unwrap_err(); 144 | println!("{:#?}", err); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /tests/bad.rs: -------------------------------------------------------------------------------- 1 | use std::path::Path; 2 | 3 | use gherkin::{Feature, ParseFileError}; 4 | 5 | fn load_feature>(path: P) -> Result { 6 | Feature::parse_path(path.as_ref(), Default::default()) 7 | } 8 | 9 | #[test] 10 | fn inconsistent_cell_count() { 11 | let error = 12 | load_feature("./tests/fixtures/data/bad/inconsistent_cell_count.feature").unwrap_err(); 13 | match error { 14 | ParseFileError::Reading { .. } => panic!("Invalid error"), 15 | ParseFileError::Parsing { error, .. } => { 16 | let error = error.unwrap(); 17 | match error { 18 | gherkin::EnvError::InconsistentCellCount(_) => {} 19 | _ => panic!("Invalid error"), 20 | } 21 | } 22 | }; 23 | } 24 | 25 | #[test] 26 | fn invalid_language() { 27 | let _ = load_feature("./tests/fixtures/data/bad/invalid_language.feature").unwrap_err(); 28 | } 29 | 30 | #[test] 31 | fn multiple_parser_errors() { 32 | let _ = load_feature("./tests/fixtures/data/bad/multiple_parser_errors.feature").unwrap_err(); 33 | } 34 | 35 | #[test] 36 | fn not_gherkin() { 37 | let _ = load_feature("./tests/fixtures/data/bad/not_gherkin.feature").unwrap_err(); 38 | } 39 | 40 | #[test] 41 | fn single_parser_error() { 42 | let _ = load_feature("./tests/fixtures/data/bad/single_parser_error.feature").unwrap_err(); 43 | } 44 | 45 | #[test] 46 | fn unexpected_eof() { 47 | let _ = load_feature("./tests/fixtures/data/bad/unexpected_eof.feature").unwrap_err(); 48 | } 49 | 50 | #[test] 51 | fn whitespace_in_tags() { 52 | let _ = load_feature("./tests/fixtures/data/bad/whitespace_in_tags.feature").unwrap_err(); 53 | } 54 | -------------------------------------------------------------------------------- /tests/cucumber.rs: -------------------------------------------------------------------------------- 1 | use std::convert::Infallible; 2 | 3 | use cucumber::World; 4 | use futures::executor; 5 | 6 | #[derive(Debug, Default, World)] 7 | pub struct MyWorld; 8 | 9 | fn main() { 10 | // Do any setup you need to do before running the Cucumber runner. 11 | // e.g. setup_some_db_thing()?; 12 | 13 | let runner = MyWorld::cucumber().run_and_exit("tests/features"); 14 | 15 | // You may choose any executor you like (`tokio`, `async-std`, etc) 16 | // You may even have an async main, it doesn't matter. The point is that 17 | // Cucumber is composable. :) 18 | executor::block_on(runner); 19 | } 20 | -------------------------------------------------------------------------------- /tests/features/de.feature: -------------------------------------------------------------------------------- 1 | # language: de 2 | 3 | Funktion: Test 4 | Beispiel: Scenario 5 | Angenommen given 6 | Dann yes -------------------------------------------------------------------------------- /tests/features/main.feature: -------------------------------------------------------------------------------- 1 | Feature: Everything 2 | 3 | Scenario: Nothing 4 | Given I just started 5 | -------------------------------------------------------------------------------- /tests/features/no.feature: -------------------------------------------------------------------------------- 1 | # language: no 2 | # meow meow 3 | Egenskap: Gjett et ord 4 | Words words words 5 | 6 | Eksempel: Ordmaker starter et spill 7 | Når Ordmaker starter et spill 8 | Så må Ordmaker vente på at Gjetter blir med 9 | 10 | # Eksempel: Gjetter blir med 11 | # Gitt at Ordmaker har startet et spill med ordet "bløtt" 12 | # Når Gjetter blir med på Ordmakers spill 13 | # Så må Gjetter gjette et ord på 5 bokstaver -------------------------------------------------------------------------------- /tests/fixtures/data/bad/inconsistent_cell_count.feature: -------------------------------------------------------------------------------- 1 | Feature: Inconsistent cell counts 2 | 3 | Scenario: minimalistic 4 | Given a data table with inconsistent cell count 5 | | foo | bar | 6 | | boz | 7 | 8 | 9 | Scenario Outline: minimalistic 10 | Given the 11 | 12 | Examples: 13 | | what | 14 | | minimalism | extra | 15 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/inconsistent_cell_count.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(6:7): inconsistent cell count within the table","source":{"location":{"column":7,"line":6},"uri":"testdata/bad/inconsistent_cell_count.feature"}}} 2 | {"parseError":{"message":"(14:5): inconsistent cell count within the table","source":{"location":{"column":5,"line":14},"uri":"testdata/bad/inconsistent_cell_count.feature"}}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/invalid_language.feature: -------------------------------------------------------------------------------- 1 | #language:no-such 2 | 3 | Feature: Minimal 4 | 5 | Scenario: minimalistic 6 | Given the minimalism 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/invalid_language.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(1:1): Language not supported: no-such","source":{"location":{"column":1,"line":1},"uri":"testdata/bad/invalid_language.feature"}}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/multiple_parser_errors.feature: -------------------------------------------------------------------------------- 1 | 2 | invalid line here 3 | 4 | Feature: Multiple parser errors 5 | 6 | Scenario: minimalistic 7 | Given the minimalism 8 | 9 | another invalid line here 10 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/multiple_parser_errors.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(2:1): expected: #EOF, #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'invalid line here'","source":{"location":{"column":1,"line":2},"uri":"testdata/bad/multiple_parser_errors.feature"}}} 2 | {"parseError":{"message":"(9:1): expected: #EOF, #TableRow, #DocStringSeparator, #StepLine, #TagLine, #ExamplesLine, #ScenarioLine, #RuleLine, #Comment, #Empty, got 'another invalid line here'","source":{"location":{"column":1,"line":9},"uri":"testdata/bad/multiple_parser_errors.feature"}}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/not_gherkin.feature: -------------------------------------------------------------------------------- 1 | not gherkin 2 | 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/not_gherkin.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(1:1): expected: #EOF, #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'not gherkin'","source":{"location":{"column":1,"line":1},"uri":"testdata/bad/not_gherkin.feature"}}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/single_parser_error.feature: -------------------------------------------------------------------------------- 1 | 2 | invalid line here 3 | 4 | Feature: Single parser error 5 | 6 | Scenario: minimalistic 7 | Given the minimalism 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/single_parser_error.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(2:1): expected: #EOF, #Language, #TagLine, #FeatureLine, #Comment, #Empty, got 'invalid line here'","source":{"location":{"column":1,"line":2},"uri":"testdata/bad/single_parser_error.feature"}}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/unexpected_eof.feature: -------------------------------------------------------------------------------- 1 | Feature: Unexpected end of file 2 | 3 | Scenario Outline: minimalistic 4 | Given the minimalism 5 | 6 | @tag 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/unexpected_eof.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(7:0): unexpected end of file, expected: #TagLine, #RuleLine, #Comment, #Empty","source":{"location":{"line":7},"uri":"testdata/bad/unexpected_eof.feature"}}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/whitespace_in_tags.feature: -------------------------------------------------------------------------------- 1 | Feature: Whitespace in tags 2 | 3 | @a tag containing whitespace 4 | Scenario: minimalistic 5 | -------------------------------------------------------------------------------- /tests/fixtures/data/bad/whitespace_in_tags.feature.errors.ndjson: -------------------------------------------------------------------------------- 1 | {"parseError":{"message":"(3:3): A tag may not contain whitespace","source":{"location":{"column":3,"line":3},"uri":"testdata/bad/whitespace_in_tags.feature"}}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/background.feature: -------------------------------------------------------------------------------- 1 | Feature: Background 2 | 3 | Background: a simple background 4 | Given the minimalism inside a background 5 | 6 | 7 | Scenario: minimalistic 8 | Given the minimalism 9 | 10 | Scenario: also minimalistic 11 | Given the minimalism -------------------------------------------------------------------------------- /tests/fixtures/data/good/background.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":"","id":"1","keyword":"Background","location":{"column":3,"line":3},"name":"a simple background","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the minimalism inside a background"}]}},{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario","location":{"column":3,"line":7},"name":"minimalistic","steps":[{"id":"2","keyword":"Given ","location":{"column":5,"line":8},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"5","keyword":"Scenario","location":{"column":3,"line":10},"name":"also minimalistic","steps":[{"id":"4","keyword":"Given ","location":{"column":5,"line":11},"text":"the minimalism"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Background","tags":[]},"uri":"testdata/good/background.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/background.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"8","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"6","text":"the minimalism inside a background"},{"astNodeIds":["2"],"id":"7","text":"the minimalism"}],"tags":[],"uri":"testdata/good/background.feature"}} 2 | {"pickle":{"astNodeIds":["5"],"id":"11","language":"en","name":"also minimalistic","steps":[{"astNodeIds":["0"],"id":"9","text":"the minimalism inside a background"},{"astNodeIds":["4"],"id":"10","text":"the minimalism"}],"tags":[],"uri":"testdata/good/background.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/background.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Background\n\n Background: a simple background\n Given the minimalism inside a background\n\n\n Scenario: minimalistic\n Given the minimalism\n\n Scenario: also minimalistic\n Given the minimalism","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/background.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/background.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Background/ 2 | (2:1)Empty:// 3 | (3:3)BackgroundLine:Background/a simple background/ 4 | (4:5)StepLine:Given /the minimalism inside a background/ 5 | (5:1)Empty:// 6 | (6:1)Empty:// 7 | (7:3)ScenarioLine:Scenario/minimalistic/ 8 | (8:5)StepLine:Given /the minimalism/ 9 | (9:1)Empty:// 10 | (10:3)ScenarioLine:Scenario/also minimalistic/ 11 | (11:5)StepLine:Given /the minimalism/ 12 | EOF 13 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/complex_background.feature: -------------------------------------------------------------------------------- 1 | Feature: Complex background 2 | We want to ensure PickleStep all have different IDs 3 | 4 | Background: a simple background 5 | Given the minimalism inside a background 6 | 7 | Scenario: minimalistic 8 | Given the minimalism 9 | 10 | Scenario: also minimalistic 11 | Given the minimalism 12 | 13 | Rule: My Rule 14 | 15 | Background: 16 | Given a rule background step 17 | 18 | Scenario: with examples 19 | Given the minimalism 20 | 21 | Examples: 22 | | value | 23 | | 1 | 24 | | 2 | 25 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/complex_background.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":"","id":"1","keyword":"Background","location":{"column":3,"line":4},"name":"a simple background","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":5},"text":"the minimalism inside a background"}]}},{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario","location":{"column":3,"line":7},"name":"minimalistic","steps":[{"id":"2","keyword":"Given ","location":{"column":5,"line":8},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"5","keyword":"Scenario","location":{"column":3,"line":10},"name":"also minimalistic","steps":[{"id":"4","keyword":"Given ","location":{"column":5,"line":11},"text":"the minimalism"}],"tags":[]}},{"rule":{"children":[{"background":{"description":"","id":"7","keyword":"Background","location":{"column":5,"line":15},"name":"","steps":[{"id":"6","keyword":"Given ","location":{"column":7,"line":16},"text":"a rule background step"}]}},{"scenario":{"description":"","examples":[{"description":"","id":"12","keyword":"Examples","location":{"column":7,"line":21},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":23},"value":"1"}],"id":"10","location":{"column":7,"line":23}},{"cells":[{"location":{"column":9,"line":24},"value":"2"}],"id":"11","location":{"column":7,"line":24}}],"tableHeader":{"cells":[{"location":{"column":9,"line":22},"value":"value"}],"id":"9","location":{"column":7,"line":22}},"tags":[]}],"id":"13","keyword":"Scenario","location":{"column":5,"line":18},"name":"with examples","steps":[{"id":"8","keyword":"Given ","location":{"column":7,"line":19},"text":"the minimalism"}],"tags":[]}}],"description":"","id":"14","keyword":"Rule","location":{"column":3,"line":13},"name":"My Rule","tags":[]}}],"description":" We want to ensure PickleStep all have different IDs","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Complex background","tags":[]},"uri":"testdata/good/complex_background.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/complex_background.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"17","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"15","text":"the minimalism inside a background"},{"astNodeIds":["2"],"id":"16","text":"the minimalism"}],"tags":[],"uri":"testdata/good/complex_background.feature"}} 2 | {"pickle":{"astNodeIds":["5"],"id":"20","language":"en","name":"also minimalistic","steps":[{"astNodeIds":["0"],"id":"18","text":"the minimalism inside a background"},{"astNodeIds":["4"],"id":"19","text":"the minimalism"}],"tags":[],"uri":"testdata/good/complex_background.feature"}} 3 | {"pickle":{"astNodeIds":["13","10"],"id":"24","language":"en","name":"with examples","steps":[{"astNodeIds":["0"],"id":"21","text":"the minimalism inside a background"},{"astNodeIds":["6"],"id":"22","text":"a rule background step"},{"astNodeIds":["8","10"],"id":"23","text":"the 1 minimalism"}],"tags":[],"uri":"testdata/good/complex_background.feature"}} 4 | {"pickle":{"astNodeIds":["13","11"],"id":"28","language":"en","name":"with examples","steps":[{"astNodeIds":["0"],"id":"25","text":"the minimalism inside a background"},{"astNodeIds":["6"],"id":"26","text":"a rule background step"},{"astNodeIds":["8","11"],"id":"27","text":"the 2 minimalism"}],"tags":[],"uri":"testdata/good/complex_background.feature"}} 5 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/complex_background.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Complex background\n We want to ensure PickleStep all have different IDs\n\n Background: a simple background\n Given the minimalism inside a background\n\n Scenario: minimalistic\n Given the minimalism\n\n Scenario: also minimalistic\n Given the minimalism\n\n Rule: My Rule\n\n Background:\n Given a rule background step\n\n Scenario: with examples\n Given the minimalism\n\n Examples:\n | value |\n | 1 |\n | 2 |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/complex_background.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/complex_background.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Complex background/ 2 | (2:1)Other:/ We want to ensure PickleStep all have different IDs/ 3 | (3:1)Other:// 4 | (4:3)BackgroundLine:Background/a simple background/ 5 | (5:5)StepLine:Given /the minimalism inside a background/ 6 | (6:1)Empty:// 7 | (7:3)ScenarioLine:Scenario/minimalistic/ 8 | (8:5)StepLine:Given /the minimalism/ 9 | (9:1)Empty:// 10 | (10:3)ScenarioLine:Scenario/also minimalistic/ 11 | (11:5)StepLine:Given /the minimalism/ 12 | (12:1)Empty:// 13 | (13:3)RuleLine:Rule/My Rule/ 14 | (14:1)Empty:// 15 | (15:5)BackgroundLine:Background// 16 | (16:7)StepLine:Given /a rule background step/ 17 | (17:1)Empty:// 18 | (18:5)ScenarioLine:Scenario/with examples/ 19 | (19:7)StepLine:Given /the minimalism/ 20 | (20:1)Empty:// 21 | (21:7)ExamplesLine:Examples// 22 | (22:7)TableRow://9:value 23 | (23:7)TableRow://9:1 24 | (24:7)TableRow://9:2 25 | EOF 26 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature: -------------------------------------------------------------------------------- 1 | Feature: DataTables 2 | 3 | Scenario: minimalistic 4 | Given a simple data table 5 | | foo | bar | 6 | | boz | boo | 7 | And a data table with a single cell 8 | | foo | 9 | And a data table with different fromatting 10 | | foo|bar| boz | 11 | And a data table with an empty cell 12 | |foo||boz| 13 | And a data table with comments and newlines inside 14 | | foo | bar | 15 | 16 | | boz | boo | 17 | # this is a comment 18 | | boz2 | boo2 | 19 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[{"location":{"column":1,"line":17},"text":" # this is a comment"}],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"13","keyword":"Scenario","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"dataTable":{"location":{"column":7,"line":5},"rows":[{"cells":[{"location":{"column":9,"line":5},"value":"foo"},{"location":{"column":15,"line":5},"value":"bar"}],"id":"0","location":{"column":7,"line":5}},{"cells":[{"location":{"column":9,"line":6},"value":"boz"},{"location":{"column":15,"line":6},"value":"boo"}],"id":"1","location":{"column":7,"line":6}}]},"id":"2","keyword":"Given ","location":{"column":5,"line":4},"text":"a simple data table"},{"dataTable":{"location":{"column":7,"line":8},"rows":[{"cells":[{"location":{"column":9,"line":8},"value":"foo"}],"id":"3","location":{"column":7,"line":8}}]},"id":"4","keyword":"And ","location":{"column":5,"line":7},"text":"a data table with a single cell"},{"dataTable":{"location":{"column":7,"line":10},"rows":[{"cells":[{"location":{"column":11,"line":10},"value":"foo"},{"location":{"column":15,"line":10},"value":"bar"},{"location":{"column":23,"line":10},"value":"boz"}],"id":"5","location":{"column":7,"line":10}}]},"id":"6","keyword":"And ","location":{"column":5,"line":9},"text":"a data table with different fromatting"},{"dataTable":{"location":{"column":7,"line":12},"rows":[{"cells":[{"location":{"column":8,"line":12},"value":"foo"},{"location":{"column":12,"line":12},"value":""},{"location":{"column":13,"line":12},"value":"boz"}],"id":"7","location":{"column":7,"line":12}}]},"id":"8","keyword":"And ","location":{"column":5,"line":11},"text":"a data table with an empty cell"},{"dataTable":{"location":{"column":7,"line":14},"rows":[{"cells":[{"location":{"column":9,"line":14},"value":"foo"},{"location":{"column":15,"line":14},"value":"bar"}],"id":"9","location":{"column":7,"line":14}},{"cells":[{"location":{"column":9,"line":16},"value":"boz"},{"location":{"column":16,"line":16},"value":"boo"}],"id":"10","location":{"column":7,"line":16}},{"cells":[{"location":{"column":9,"line":18},"value":"boz2"},{"location":{"column":16,"line":18},"value":"boo2"}],"id":"11","location":{"column":7,"line":18}}]},"id":"12","keyword":"And ","location":{"column":5,"line":13},"text":"a data table with comments and newlines inside"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"DataTables","tags":[]},"uri":"testdata/good/datatables.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.md: -------------------------------------------------------------------------------- 1 | ## Feature: DataTables 2 | 3 | ### Scenario: minimalistic 4 | 5 | * Given a simple data table 6 | | foo | bar | 7 | | --- | --- | 8 | | boz | boo | 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.md.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario","location":{"column":5,"line":3},"name":"minimalistic","steps":[{"dataTable":{"location":{"column":3,"line":6},"rows":[{"cells":[{"location":{"column":5,"line":6},"value":"foo"},{"location":{"column":11,"line":6},"value":"bar"}],"id":"0","location":{"column":3,"line":6}},{"cells":[{"location":{"column":5,"line":8},"value":"boz"},{"location":{"column":11,"line":8},"value":"boo"}],"id":"1","location":{"column":3,"line":8}}]},"id":"2","keyword":"Given ","location":{"column":3,"line":5},"text":"a simple data table"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":4,"line":1},"name":"DataTables","tags":[]},"uri":"testdata/good/datatables.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.md.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"5","language":"en","name":"minimalistic","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]}]}},"astNodeIds":["2"],"id":"4","text":"a simple data table"}],"tags":[],"uri":"testdata/good/datatables.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.md.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"## Feature: DataTables\n\n### Scenario: minimalistic\n\n* Given a simple data table \n | foo | bar |\n | --- | --- |\n | boz | boo |\n","mediaType":"text/x.cucumber.gherkin+markdown","uri":"testdata/good/datatables.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["13"],"id":"19","language":"en","name":"minimalistic","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]}]}},"astNodeIds":["2"],"id":"14","text":"a simple data table"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"}]}]}},"astNodeIds":["4"],"id":"15","text":"a data table with a single cell"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"},{"value":"boz"}]}]}},"astNodeIds":["6"],"id":"16","text":"a data table with different fromatting"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":""},{"value":"boz"}]}]}},"astNodeIds":["8"],"id":"17","text":"a data table with an empty cell"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"foo"},{"value":"bar"}]},{"cells":[{"value":"boz"},{"value":"boo"}]},{"cells":[{"value":"boz2"},{"value":"boo2"}]}]}},"astNodeIds":["12"],"id":"18","text":"a data table with comments and newlines inside"}],"tags":[],"uri":"testdata/good/datatables.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: DataTables\n\n Scenario: minimalistic\n Given a simple data table\n | foo | bar |\r\n | boz | boo |\n And a data table with a single cell\n | foo |\n And a data table with different fromatting\n | foo|bar| boz | \n And a data table with an empty cell\n |foo||boz|\n And a data table with comments and newlines inside\n | foo | bar |\r\n\r\n | boz | boo |\r\n # this is a comment\r\n | boz2 | boo2 |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/datatables.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/DataTables/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario/minimalistic/ 4 | (4:5)StepLine:Given /a simple data table/ 5 | (5:7)TableRow://9:foo,15:bar 6 | (6:7)TableRow://9:boz,15:boo 7 | (7:5)StepLine:And /a data table with a single cell/ 8 | (8:7)TableRow://9:foo 9 | (9:5)StepLine:And /a data table with different fromatting/ 10 | (10:7)TableRow://11:foo,15:bar,23:boz 11 | (11:5)StepLine:And /a data table with an empty cell/ 12 | (12:7)TableRow://8:foo,12:,13:boz 13 | (13:5)StepLine:And /a data table with comments and newlines inside/ 14 | (14:7)TableRow://9:foo,15:bar 15 | (15:1)Empty:// 16 | (16:7)TableRow://9:boz,16:boo 17 | (17:1)Comment:/ # this is a comment/ 18 | (18:7)TableRow://9:boz2,16:boo2 19 | EOF 20 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables_with_new_lines.feature: -------------------------------------------------------------------------------- 1 | Feature: DataTables 2 | 3 | Scenario: some whitespace is important 4 | Given 3 lines of poetry on 5 lines 5 | | \nraindrops--\nher last kiss\ngoodbye.\n | 6 | Given an example of negative space 7 | | lost i n space | 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables_with_new_lines.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"4","keyword":"Scenario","location":{"column":3,"line":3},"name":"some whitespace is important","steps":[{"dataTable":{"location":{"column":7,"line":5},"rows":[{"cells":[{"location":{"column":10,"line":5},"value":"\nraindrops--\nher last kiss\ngoodbye.\n"}],"id":"0","location":{"column":7,"line":5}}]},"id":"1","keyword":"Given ","location":{"column":5,"line":4},"text":"3 lines of poetry on 5 lines"},{"dataTable":{"location":{"column":7,"line":7},"rows":[{"cells":[{"location":{"column":16,"line":7},"value":"lost i n space"}],"id":"2","location":{"column":7,"line":7}}]},"id":"3","keyword":"Given ","location":{"column":5,"line":6},"text":"an example of negative space"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"DataTables","tags":[]},"uri":"testdata/good/datatables_with_new_lines.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables_with_new_lines.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4"],"id":"7","language":"en","name":"some whitespace is important","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"\nraindrops--\nher last kiss\ngoodbye.\n"}]}]}},"astNodeIds":["1"],"id":"5","text":"3 lines of poetry on 5 lines"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"lost i n space"}]}]}},"astNodeIds":["3"],"id":"6","text":"an example of negative space"}],"tags":[],"uri":"testdata/good/datatables_with_new_lines.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables_with_new_lines.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: DataTables\n\n Scenario: some whitespace is important\n Given 3 lines of poetry on 5 lines\n | \\nraindrops--\\nher last kiss\\ngoodbye.\\n |\n Given an example of negative space\n | lost i n space |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/datatables_with_new_lines.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/datatables_with_new_lines.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/DataTables/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario/some whitespace is important/ 4 | (4:5)StepLine:Given /3 lines of poetry on 5 lines/ 5 | (5:7)TableRow://10: 6 | raindrops-- 7 | her last kiss 8 | goodbye. 9 | 10 | (6:5)StepLine:Given /an example of negative space/ 11 | (7:7)TableRow://16:lost i n space 12 | EOF 13 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/descriptions.feature: -------------------------------------------------------------------------------- 1 | Feature: Descriptions everywhere 2 | This is a single line description 3 | 4 | Scenario: two lines 5 | This description 6 | has two lines and indented with two spaces 7 | Given the minimalism 8 | 9 | Scenario: without indentation 10 | This is a description without indentation 11 | Given the minimalism 12 | 13 | Scenario: empty lines in the middle 14 | This description 15 | 16 | has an empty line in the middle 17 | Given the minimalism 18 | 19 | Scenario: empty lines around 20 | 21 | This description 22 | has an empty lines around 23 | 24 | Given the minimalism 25 | 26 | Scenario: comment after description 27 | This description 28 | has a comment after 29 | 30 | # this is a comment 31 | Given the minimalism 32 | 33 | Scenario: comment right after description 34 | This description 35 | has a comment right after 36 | # this is another comment 37 | 38 | Given the minimalism 39 | 40 | Scenario: description with escaped docstring separator 41 | This description has an \"\"\" (escaped docstring sparator) 42 | 43 | Given the minimalism 44 | 45 | Scenario Outline: scenario outline with a description 46 | This is a scenario outline description 47 | Given the minimalism 48 | 49 | Examples: examples with description 50 | This is an examples description 51 | | foo | 52 | | bar | 53 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/descriptions.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[{"location":{"column":1,"line":30},"text":"# this is a comment"},{"location":{"column":1,"line":36},"text":" # this is another comment"}],"feature":{"children":[{"scenario":{"description":" This description\n has two lines and indented with two spaces","examples":[],"id":"1","keyword":"Scenario","location":{"column":3,"line":4},"name":"two lines","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":7},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":"This is a description without indentation","examples":[],"id":"3","keyword":"Scenario","location":{"column":1,"line":9},"name":"without indentation","steps":[{"id":"2","keyword":"Given ","location":{"column":3,"line":11},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":" This description\n\n has an empty line in the middle","examples":[],"id":"5","keyword":"Scenario","location":{"column":3,"line":13},"name":"empty lines in the middle","steps":[{"id":"4","keyword":"Given ","location":{"column":5,"line":17},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":" This description\n has an empty lines around","examples":[],"id":"7","keyword":"Scenario","location":{"column":3,"line":19},"name":"empty lines around","steps":[{"id":"6","keyword":"Given ","location":{"column":5,"line":24},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":" This description\n has a comment after","examples":[],"id":"9","keyword":"Scenario","location":{"column":3,"line":26},"name":"comment after description","steps":[{"id":"8","keyword":"Given ","location":{"column":5,"line":31},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":" This description\n has a comment right after","examples":[],"id":"11","keyword":"Scenario","location":{"column":3,"line":33},"name":"comment right after description","steps":[{"id":"10","keyword":"Given ","location":{"column":5,"line":38},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":" This description has an \\\"\\\"\\\" (escaped docstring sparator)","examples":[],"id":"13","keyword":"Scenario","location":{"column":3,"line":40},"name":"description with escaped docstring separator","steps":[{"id":"12","keyword":"Given ","location":{"column":5,"line":43},"text":"the minimalism"}],"tags":[]}},{"scenario":{"description":"This is a scenario outline description","examples":[{"description":"This is an examples description","id":"17","keyword":"Examples","location":{"column":3,"line":49},"name":"examples with description","tableBody":[{"cells":[{"location":{"column":7,"line":52},"value":"bar"}],"id":"16","location":{"column":5,"line":52}}],"tableHeader":{"cells":[{"location":{"column":7,"line":51},"value":"foo"}],"id":"15","location":{"column":5,"line":51}},"tags":[]}],"id":"18","keyword":"Scenario Outline","location":{"column":3,"line":45},"name":"scenario outline with a description","steps":[{"id":"14","keyword":"Given ","location":{"column":5,"line":47},"text":"the minimalism"}],"tags":[]}}],"description":" This is a single line description","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Descriptions everywhere","tags":[]},"uri":"testdata/good/descriptions.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/descriptions.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"20","language":"en","name":"two lines","steps":[{"astNodeIds":["0"],"id":"19","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 2 | {"pickle":{"astNodeIds":["3"],"id":"22","language":"en","name":"without indentation","steps":[{"astNodeIds":["2"],"id":"21","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 3 | {"pickle":{"astNodeIds":["5"],"id":"24","language":"en","name":"empty lines in the middle","steps":[{"astNodeIds":["4"],"id":"23","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 4 | {"pickle":{"astNodeIds":["7"],"id":"26","language":"en","name":"empty lines around","steps":[{"astNodeIds":["6"],"id":"25","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 5 | {"pickle":{"astNodeIds":["9"],"id":"28","language":"en","name":"comment after description","steps":[{"astNodeIds":["8"],"id":"27","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 6 | {"pickle":{"astNodeIds":["11"],"id":"30","language":"en","name":"comment right after description","steps":[{"astNodeIds":["10"],"id":"29","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 7 | {"pickle":{"astNodeIds":["13"],"id":"32","language":"en","name":"description with escaped docstring separator","steps":[{"astNodeIds":["12"],"id":"31","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 8 | {"pickle":{"astNodeIds":["18","16"],"id":"34","language":"en","name":"scenario outline with a description","steps":[{"astNodeIds":["14","16"],"id":"33","text":"the minimalism"}],"tags":[],"uri":"testdata/good/descriptions.feature"}} 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/descriptions.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Descriptions everywhere\n This is a single line description\n\n Scenario: two lines\n This description\n has two lines and indented with two spaces\n Given the minimalism\n\nScenario: without indentation\nThis is a description without indentation\n Given the minimalism\n\n Scenario: empty lines in the middle\n This description\n\n has an empty line in the middle\n Given the minimalism\n\n Scenario: empty lines around\n\n This description\n has an empty lines around\n\n Given the minimalism\n\n Scenario: comment after description\n This description\n has a comment after\n\n# this is a comment\n Given the minimalism\n\n Scenario: comment right after description\n This description\n has a comment right after\n # this is another comment\n\n Given the minimalism\n\n Scenario: description with escaped docstring separator\n This description has an \\\"\\\"\\\" (escaped docstring sparator)\n\n Given the minimalism\n\n Scenario Outline: scenario outline with a description\nThis is a scenario outline description\n Given the minimalism\n\n Examples: examples with description\nThis is an examples description\n | foo |\r\n | bar |\r\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/descriptions.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/descriptions.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Descriptions everywhere/ 2 | (2:1)Other:/ This is a single line description/ 3 | (3:1)Other:// 4 | (4:3)ScenarioLine:Scenario/two lines/ 5 | (5:1)Other:/ This description/ 6 | (6:1)Other:/ has two lines and indented with two spaces/ 7 | (7:5)StepLine:Given /the minimalism/ 8 | (8:1)Empty:// 9 | (9:1)ScenarioLine:Scenario/without indentation/ 10 | (10:1)Other:/This is a description without indentation/ 11 | (11:3)StepLine:Given /the minimalism/ 12 | (12:1)Empty:// 13 | (13:3)ScenarioLine:Scenario/empty lines in the middle/ 14 | (14:1)Other:/ This description/ 15 | (15:1)Other:// 16 | (16:1)Other:/ has an empty line in the middle/ 17 | (17:5)StepLine:Given /the minimalism/ 18 | (18:1)Empty:// 19 | (19:3)ScenarioLine:Scenario/empty lines around/ 20 | (20:1)Empty:// 21 | (21:1)Other:/ This description/ 22 | (22:1)Other:/ has an empty lines around/ 23 | (23:1)Other:// 24 | (24:5)StepLine:Given /the minimalism/ 25 | (25:1)Empty:// 26 | (26:3)ScenarioLine:Scenario/comment after description/ 27 | (27:1)Other:/ This description/ 28 | (28:1)Other:/ has a comment after/ 29 | (29:1)Other:// 30 | (30:1)Comment:/# this is a comment/ 31 | (31:5)StepLine:Given /the minimalism/ 32 | (32:1)Empty:// 33 | (33:3)ScenarioLine:Scenario/comment right after description/ 34 | (34:1)Other:/ This description/ 35 | (35:1)Other:/ has a comment right after/ 36 | (36:1)Comment:/ # this is another comment/ 37 | (37:1)Empty:// 38 | (38:5)StepLine:Given /the minimalism/ 39 | (39:1)Empty:// 40 | (40:3)ScenarioLine:Scenario/description with escaped docstring separator/ 41 | (41:1)Other:/ This description has an \"\"\" (escaped docstring sparator)/ 42 | (42:1)Other:// 43 | (43:5)StepLine:Given /the minimalism/ 44 | (44:1)Empty:// 45 | (45:3)ScenarioLine:Scenario Outline/scenario outline with a description/ 46 | (46:1)Other:/This is a scenario outline description/ 47 | (47:5)StepLine:Given /the minimalism/ 48 | (48:1)Empty:// 49 | (49:3)ExamplesLine:Examples/examples with description/ 50 | (50:1)Other:/This is an examples description/ 51 | (51:5)TableRow://7:foo 52 | (52:5)TableRow://7:bar 53 | EOF 54 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature: -------------------------------------------------------------------------------- 1 | Feature: DocString variations 2 | 3 | Scenario: minimalistic 4 | Given a simple DocString 5 | """ 6 | first line (no indent) 7 | second line (indented with two spaces) 8 | 9 | third line was empty 10 | """ 11 | Given a DocString with content type 12 | """xml 13 | 14 | 15 | 16 | """ 17 | And a DocString with wrong indentation 18 | """ 19 | wrongly indented line 20 | """ 21 | And a DocString with alternative separator 22 | ``` 23 | first line 24 | second line 25 | ``` 26 | And a DocString with normal separator inside 27 | ``` 28 | first line 29 | """ 30 | third line 31 | ``` 32 | And a DocString with alternative separator inside 33 | """ 34 | first line 35 | ``` 36 | third line 37 | """ 38 | And a DocString with escaped separator inside 39 | """ 40 | first line 41 | \"\"\" 42 | third line 43 | """ 44 | And a DocString with an escaped alternative separator inside 45 | ``` 46 | first line 47 | \`\`\` 48 | third line 49 | ``` -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"8","keyword":"Scenario","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"docString":{"content":"first line (no indent)\n second line (indented with two spaces)\n\nthird line was empty","delimiter":"\"\"\"","location":{"column":7,"line":5}},"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"a simple DocString"},{"docString":{"content":"\n \n","delimiter":"\"\"\"","location":{"column":7,"line":12},"mediaType":"xml"},"id":"1","keyword":"Given ","location":{"column":5,"line":11},"text":"a DocString with content type"},{"docString":{"content":"wrongly indented line","delimiter":"\"\"\"","location":{"column":7,"line":18}},"id":"2","keyword":"And ","location":{"column":5,"line":17},"text":"a DocString with wrong indentation"},{"docString":{"content":"first line\nsecond line","delimiter":"```","location":{"column":7,"line":22}},"id":"3","keyword":"And ","location":{"column":5,"line":21},"text":"a DocString with alternative separator"},{"docString":{"content":"first line\n\"\"\"\nthird line","delimiter":"```","location":{"column":7,"line":27}},"id":"4","keyword":"And ","location":{"column":5,"line":26},"text":"a DocString with normal separator inside"},{"docString":{"content":"first line\n```\nthird line","delimiter":"\"\"\"","location":{"column":7,"line":33}},"id":"5","keyword":"And ","location":{"column":5,"line":32},"text":"a DocString with alternative separator inside"},{"docString":{"content":"first line\n\"\"\"\nthird line","delimiter":"\"\"\"","location":{"column":7,"line":39}},"id":"6","keyword":"And ","location":{"column":5,"line":38},"text":"a DocString with escaped separator inside"},{"docString":{"content":"first line\n```\nthird line","delimiter":"```","location":{"column":7,"line":45}},"id":"7","keyword":"And ","location":{"column":5,"line":44},"text":"a DocString with an escaped alternative separator inside"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"DocString variations","tags":[]},"uri":"testdata/good/docstrings.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.md: -------------------------------------------------------------------------------- 1 | ## Feature: DocString variations 2 | 3 | ### Scenario: minimalistic 4 | 5 | * And a DocString with an implicitly escaped separator inside 6 | ```` 7 | ``` 8 | ```` 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.md.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":5,"line":3},"name":"minimalistic","steps":[{"docString":{"content":"```","delimiter":"````","location":{"column":1,"line":6}},"id":"0","keyword":"And ","location":{"column":3,"line":5},"text":"a DocString with an implicitly escaped separator inside"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":4,"line":1},"name":"DocString variations","tags":[]},"uri":"testdata/good/docstrings.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.md.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"3","language":"en","name":"minimalistic","steps":[{"argument":{"docString":{"content":"```"}},"astNodeIds":["0"],"id":"2","text":"a DocString with an implicitly escaped separator inside"}],"tags":[],"uri":"testdata/good/docstrings.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.md.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"## Feature: DocString variations\n\n### Scenario: minimalistic\n\n* And a DocString with an implicitly escaped separator inside\n````\n```\n````\n","mediaType":"text/x.cucumber.gherkin+markdown","uri":"testdata/good/docstrings.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["8"],"id":"17","language":"en","name":"minimalistic","steps":[{"argument":{"docString":{"content":"first line (no indent)\n second line (indented with two spaces)\n\nthird line was empty"}},"astNodeIds":["0"],"id":"9","text":"a simple DocString"},{"argument":{"docString":{"content":"\n \n","mediaType":"xml"}},"astNodeIds":["1"],"id":"10","text":"a DocString with content type"},{"argument":{"docString":{"content":"wrongly indented line"}},"astNodeIds":["2"],"id":"11","text":"a DocString with wrong indentation"},{"argument":{"docString":{"content":"first line\nsecond line"}},"astNodeIds":["3"],"id":"12","text":"a DocString with alternative separator"},{"argument":{"docString":{"content":"first line\n\"\"\"\nthird line"}},"astNodeIds":["4"],"id":"13","text":"a DocString with normal separator inside"},{"argument":{"docString":{"content":"first line\n```\nthird line"}},"astNodeIds":["5"],"id":"14","text":"a DocString with alternative separator inside"},{"argument":{"docString":{"content":"first line\n\"\"\"\nthird line"}},"astNodeIds":["6"],"id":"15","text":"a DocString with escaped separator inside"},{"argument":{"docString":{"content":"first line\n```\nthird line"}},"astNodeIds":["7"],"id":"16","text":"a DocString with an escaped alternative separator inside"}],"tags":[],"uri":"testdata/good/docstrings.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: DocString variations\n\n Scenario: minimalistic\n Given a simple DocString\n \"\"\"\n first line (no indent)\n second line (indented with two spaces)\n\n third line was empty\n \"\"\"\n Given a DocString with content type\n \"\"\"xml\n \n \n \n \"\"\"\n And a DocString with wrong indentation\n \"\"\"\n wrongly indented line\n \"\"\"\n And a DocString with alternative separator\n ```\n first line\n second line\n ```\n And a DocString with normal separator inside\n ```\n first line\n \"\"\"\n third line\n ```\n And a DocString with alternative separator inside\n \"\"\"\n first line\n ```\n third line\n \"\"\"\n And a DocString with escaped separator inside\n \"\"\"\n first line\n \\\"\\\"\\\"\n third line\n \"\"\"\n And a DocString with an escaped alternative separator inside\n ```\n first line\n \\`\\`\\`\n third line\n ```","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/docstrings.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/docstrings.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/DocString variations/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario/minimalistic/ 4 | (4:5)StepLine:Given /a simple DocString/ 5 | (5:7)DocStringSeparator:"""// 6 | (6:1)Other:/first line (no indent)/ 7 | (7:1)Other:/ second line (indented with two spaces)/ 8 | (8:1)Other:// 9 | (9:1)Other:/third line was empty/ 10 | (10:7)DocStringSeparator:"""// 11 | (11:5)StepLine:Given /a DocString with content type/ 12 | (12:7)DocStringSeparator:"""/xml/ 13 | (13:1)Other:// 14 | (14:1)Other:/ / 15 | (15:1)Other:// 16 | (16:7)DocStringSeparator:"""// 17 | (17:5)StepLine:And /a DocString with wrong indentation/ 18 | (18:7)DocStringSeparator:"""// 19 | (19:1)Other:/wrongly indented line/ 20 | (20:7)DocStringSeparator:"""// 21 | (21:5)StepLine:And /a DocString with alternative separator/ 22 | (22:7)DocStringSeparator:```// 23 | (23:1)Other:/first line/ 24 | (24:1)Other:/second line/ 25 | (25:7)DocStringSeparator:```// 26 | (26:5)StepLine:And /a DocString with normal separator inside/ 27 | (27:7)DocStringSeparator:```// 28 | (28:1)Other:/first line/ 29 | (29:1)Other:/"""/ 30 | (30:1)Other:/third line/ 31 | (31:7)DocStringSeparator:```// 32 | (32:5)StepLine:And /a DocString with alternative separator inside/ 33 | (33:7)DocStringSeparator:"""// 34 | (34:1)Other:/first line/ 35 | (35:1)Other:/```/ 36 | (36:1)Other:/third line/ 37 | (37:7)DocStringSeparator:"""// 38 | (38:5)StepLine:And /a DocString with escaped separator inside/ 39 | (39:7)DocStringSeparator:"""// 40 | (40:1)Other:/first line/ 41 | (41:1)Other:/"""/ 42 | (42:1)Other:/third line/ 43 | (43:7)DocStringSeparator:"""// 44 | (44:5)StepLine:And /a DocString with an escaped alternative separator inside/ 45 | (45:7)DocStringSeparator:```// 46 | (46:1)Other:/first line/ 47 | (47:1)Other:/```/ 48 | (48:1)Other:/third line/ 49 | (49:7)DocStringSeparator:```// 50 | EOF 51 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/empty.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cucumber-rs/gherkin/fd6fcd335e01907d93903a83fd331dd529e5b3b2/tests/fixtures/data/good/empty.feature -------------------------------------------------------------------------------- /tests/fixtures/data/good/empty.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"uri":"testdata/good/empty.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/empty.feature.pickles.ndjson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cucumber-rs/gherkin/fd6fcd335e01907d93903a83fd331dd529e5b3b2/tests/fixtures/data/good/empty.feature.pickles.ndjson -------------------------------------------------------------------------------- /tests/fixtures/data/good/empty.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/empty.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/empty.feature.tokens: -------------------------------------------------------------------------------- 1 | EOF 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/escaped_pipes.feature: -------------------------------------------------------------------------------- 1 | Feature: Escaped pipes 2 | The \-character will be considered as an escape in table cell 3 | iff it is followed by a |-character, a \-character or an n. 4 | 5 | Scenario: They are the future 6 | Given they have arrived 7 | | æ | o | 8 | | a | ø | 9 | Given they have arrived 10 | | \|æ\\n | \o\no\ | 11 | | \\\|a\\\\n | ø\\\nø\\| 12 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/escaped_pipes.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"6","keyword":"Scenario","location":{"column":3,"line":5},"name":"They are the future","steps":[{"dataTable":{"location":{"column":7,"line":7},"rows":[{"cells":[{"location":{"column":9,"line":7},"value":"æ"},{"location":{"column":13,"line":7},"value":"o"}],"id":"0","location":{"column":7,"line":7}},{"cells":[{"location":{"column":9,"line":8},"value":"a"},{"location":{"column":13,"line":8},"value":"ø"}],"id":"1","location":{"column":7,"line":8}}]},"id":"2","keyword":"Given ","location":{"column":5,"line":6},"text":"they have arrived"},{"dataTable":{"location":{"column":7,"line":10},"rows":[{"cells":[{"location":{"column":9,"line":10},"value":"|æ\\n"},{"location":{"column":22,"line":10},"value":"\\o\no\\"}],"id":"3","location":{"column":7,"line":10}},{"cells":[{"location":{"column":9,"line":11},"value":"\\|a\\\\n"},{"location":{"column":22,"line":11},"value":"ø\\\nø\\"}],"id":"4","location":{"column":7,"line":11}}]},"id":"5","keyword":"Given ","location":{"column":5,"line":9},"text":"they have arrived"}],"tags":[]}}],"description":" The \\-character will be considered as an escape in table cell\n iff it is followed by a |-character, a \\-character or an n.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Escaped pipes","tags":[]},"uri":"testdata/good/escaped_pipes.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/escaped_pipes.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["6"],"id":"9","language":"en","name":"They are the future","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"æ"},{"value":"o"}]},{"cells":[{"value":"a"},{"value":"ø"}]}]}},"astNodeIds":["2"],"id":"7","text":"they have arrived"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"|æ\\n"},{"value":"\\o\no\\"}]},{"cells":[{"value":"\\|a\\\\n"},{"value":"ø\\\nø\\"}]}]}},"astNodeIds":["5"],"id":"8","text":"they have arrived"}],"tags":[],"uri":"testdata/good/escaped_pipes.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/escaped_pipes.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Escaped pipes\n The \\-character will be considered as an escape in table cell\n iff it is followed by a |-character, a \\-character or an n.\n\n Scenario: They are the future\n Given they have arrived\n | æ | o |\n | a | ø |\n Given they have arrived\n | \\|æ\\\\n | \\o\\no\\ |\n | \\\\\\|a\\\\\\\\n | ø\\\\\\nø\\\\|\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/escaped_pipes.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/escaped_pipes.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Escaped pipes/ 2 | (2:1)Other:/ The \-character will be considered as an escape in table cell/ 3 | (3:1)Other:/ iff it is followed by a |-character, a \-character or an n./ 4 | (4:1)Other:// 5 | (5:3)ScenarioLine:Scenario/They are the future/ 6 | (6:5)StepLine:Given /they have arrived/ 7 | (7:7)TableRow://9:æ,13:o 8 | (8:7)TableRow://9:a,13:ø 9 | (9:5)StepLine:Given /they have arrived/ 10 | (10:7)TableRow://9:|æ\n,22:\o 11 | o\ 12 | (11:7)TableRow://9:\|a\\n,22:ø\ 13 | ø\ 14 | EOF 15 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_token_multiple.feature: -------------------------------------------------------------------------------- 1 | Feature: Example token used multiple times 2 | 3 | Scenario Outline: Token used twice in a single step 4 | Given 5 | 6 | Examples: 7 | | what | 8 | | usage | 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_token_multiple.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"3","keyword":"Examples","location":{"column":5,"line":6},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":8},"value":"usage"}],"id":"2","location":{"column":7,"line":8}}],"tableHeader":{"cells":[{"location":{"column":9,"line":7},"value":"what"}],"id":"1","location":{"column":7,"line":7}},"tags":[]}],"id":"4","keyword":"Scenario Outline","location":{"column":3,"line":3},"name":"Token used twice in a single step","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":" "}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Example token used multiple times","tags":[]},"uri":"testdata/good/example_token_multiple.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_token_multiple.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4","2"],"id":"6","language":"en","name":"Token used twice in a single step","steps":[{"astNodeIds":["0","2"],"id":"5","text":"usage usage"}],"tags":[],"uri":"testdata/good/example_token_multiple.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_token_multiple.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Example token used multiple times\n\n Scenario Outline: Token used twice in a single step\n Given \n\n Examples:\n | what |\n | usage |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/example_token_multiple.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_token_multiple.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Example token used multiple times/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario Outline/Token used twice in a single step/ 4 | (4:5)StepLine:Given / / 5 | (5:1)Empty:// 6 | (6:5)ExamplesLine:Examples// 7 | (7:7)TableRow://9:what 8 | (8:7)TableRow://9:usage 9 | EOF 10 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_tokens_everywhere.feature: -------------------------------------------------------------------------------- 1 | Feature: Example tokens everywhere 2 | 3 | Scenario Outline: the 4 | Given the : 5 | """ 6 | 7 | """ 8 | Given the : 9 | | | 10 | 11 | Examples: 12 | | one | two | three | four | five | 13 | | un | deux | trois | quatre | cinq | 14 | | uno | dos | tres | quatro | cinco | 15 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_tokens_everywhere.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"6","keyword":"Examples","location":{"column":5,"line":11},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":13},"value":"un"},{"location":{"column":15,"line":13},"value":"deux"},{"location":{"column":22,"line":13},"value":"trois"},{"location":{"column":30,"line":13},"value":"quatre"},{"location":{"column":39,"line":13},"value":"cinq"}],"id":"4","location":{"column":7,"line":13}},{"cells":[{"location":{"column":9,"line":14},"value":"uno"},{"location":{"column":15,"line":14},"value":"dos"},{"location":{"column":22,"line":14},"value":"tres"},{"location":{"column":30,"line":14},"value":"quatro"},{"location":{"column":39,"line":14},"value":"cinco"}],"id":"5","location":{"column":7,"line":14}}],"tableHeader":{"cells":[{"location":{"column":9,"line":12},"value":"one"},{"location":{"column":15,"line":12},"value":"two"},{"location":{"column":22,"line":12},"value":"three"},{"location":{"column":30,"line":12},"value":"four"},{"location":{"column":39,"line":12},"value":"five"}],"id":"3","location":{"column":7,"line":12}},"tags":[]}],"id":"7","keyword":"Scenario Outline","location":{"column":3,"line":3},"name":"the ","steps":[{"docString":{"content":"","delimiter":"\"\"\"","location":{"column":7,"line":5}},"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the :"},{"dataTable":{"location":{"column":7,"line":9},"rows":[{"cells":[{"location":{"column":9,"line":9},"value":""}],"id":"1","location":{"column":7,"line":9}}]},"id":"2","keyword":"Given ","location":{"column":5,"line":8},"text":"the :"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Example tokens everywhere","tags":[]},"uri":"testdata/good/example_tokens_everywhere.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_tokens_everywhere.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["7","4"],"id":"10","language":"en","name":"the un","steps":[{"argument":{"docString":{"content":"trois"}},"astNodeIds":["0","4"],"id":"8","text":"the deux:"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"cinq"}]}]}},"astNodeIds":["2","4"],"id":"9","text":"the quatre:"}],"tags":[],"uri":"testdata/good/example_tokens_everywhere.feature"}} 2 | {"pickle":{"astNodeIds":["7","5"],"id":"13","language":"en","name":"the uno","steps":[{"argument":{"docString":{"content":"tres"}},"astNodeIds":["0","5"],"id":"11","text":"the dos:"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"cinco"}]}]}},"astNodeIds":["2","5"],"id":"12","text":"the quatro:"}],"tags":[],"uri":"testdata/good/example_tokens_everywhere.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_tokens_everywhere.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Example tokens everywhere\n\n Scenario Outline: the \n Given the :\n \"\"\"\n \n \"\"\"\n Given the :\n | |\n\n Examples:\n | one | two | three | four | five |\n | un | deux | trois | quatre | cinq |\n | uno | dos | tres | quatro | cinco |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/example_tokens_everywhere.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/example_tokens_everywhere.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Example tokens everywhere/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario Outline/the / 4 | (4:5)StepLine:Given /the :/ 5 | (5:7)DocStringSeparator:"""// 6 | (6:1)Other:// 7 | (7:7)DocStringSeparator:"""// 8 | (8:5)StepLine:Given /the :/ 9 | (9:7)TableRow://9: 10 | (10:1)Empty:// 11 | (11:5)ExamplesLine:Examples// 12 | (12:7)TableRow://9:one,15:two,22:three,30:four,39:five 13 | (13:7)TableRow://9:un,15:deux,22:trois,30:quatre,39:cinq 14 | (14:7)TableRow://9:uno,15:dos,22:tres,30:quatro,39:cinco 15 | EOF 16 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/feature_with_comment.feature: -------------------------------------------------------------------------------- 1 | #comment 2 | Feature: feature 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/feature_with_comment.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":["comment"],"feature":{"children":[],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"feature","tags":[]},"uri":"testdata/good/feature_with_comment.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/feature_with_comment_and_tag.feature: -------------------------------------------------------------------------------- 1 | #comment 2 | @tag 3 | Feature: feature 4 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/feature_with_comment_and_tag.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":["comment"],"feature":{"children":[],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"feature","tags":["tag"]},"uri":"testdata/good/feature_with_comment.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/feature_with_tag.feature: -------------------------------------------------------------------------------- 1 | @tag 2 | Feature: feature 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/feature_with_tag.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"feature","tags":["tag"]},"uri":"testdata/good/feature_with_tag.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_emoji.feature: -------------------------------------------------------------------------------- 1 | # language: em 2 | 📚: 🙈🙉🙊 3 | 4 | 📕: 💃 5 | 😐🎸 6 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_emoji.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"📕","location":{"column":3,"line":4},"name":"💃","steps":[{"id":"0","keyword":"😐","location":{"column":5,"line":5},"text":"🎸"}],"tags":[]}}],"description":"","keyword":"📚","language":"em","location":{"column":1,"line":2},"name":"🙈🙉🙊","tags":[]},"uri":"testdata/good/i18n_emoji.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_emoji.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"3","language":"em","name":"💃","steps":[{"astNodeIds":["0"],"id":"2","text":"🎸"}],"tags":[],"uri":"testdata/good/i18n_emoji.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_emoji.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"# language: em\n📚: 🙈🙉🙊\n\n 📕: 💃\n 😐🎸\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/i18n_emoji.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_emoji.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)Language:/em/ 2 | (2:1)FeatureLine:📚/🙈🙉🙊/ 3 | (3:1)Empty:// 4 | (4:3)ScenarioLine:📕/💃/ 5 | (5:5)StepLine:😐/🎸/ 6 | EOF 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_fr.feature: -------------------------------------------------------------------------------- 1 | #language:fr 2 | Fonctionnalité: i18n support 3 | 4 | Scénario: Support des caractères spéciaux 5 | Soit un exemple de scénario en français 6 | Quand j'ai 1 gâteau 7 | Alors je suis heureux 8 | 9 | Scénario: Support du mot-clef "Etant donné que " 10 | Etant donné que j'aime les gâteaux 11 | Lorsqu'on m'offre 1 gâteau 12 | Alors je suis heureux 13 | 14 | Scénario: Support du mot-clef "Etant donné qu'" 15 | Etant donné qu'offrir un gâteau rend heureux 16 | Lorsqu'on m'offre 1 gâteau 17 | Alors je suis heureux 18 | 19 | Scénario: Support du mot-clef "Étant donné que " 20 | Étant donné que j'aime les gâteaux 21 | Lorsqu'on m'offre 1 gâteau 22 | Alors je suis heureux 23 | 24 | Scénario: Support du mot-clef "Étant donné qu'" 25 | Étant donné qu'offrir un gâteau rend heureux 26 | Lorsqu'on m'offre 1 gâteau 27 | Alors je suis heureux 28 | 29 | Scénario: Support du mot-clef "Et que " 30 | Soit un exemple de scénario en français 31 | Lorsque j'ai 2 gâteaux 32 | Et que quelqu'un m'offre 1 gâteau 33 | Alors j'ai 3 gâteaux 34 | 35 | Scénario: Support du mot-clef "Et qu'" 36 | Soit un exemple de scénario en français 37 | Lorsque j'ai 2 gâteaux 38 | Et qu'on m'offre 1 gâteau 39 | Alors j'ai 3 gâteaux 40 | 41 | Scénario: Support du mot-clef "Et " 42 | Soit un exemple de scénario en français 43 | Quand j'ai 2 gâteaux 44 | Et quelqu'un m'offre 1 gâteau 45 | Alors j'ai 3 gâteaux 46 | 47 | Scénario: Support du mot-clef "Mais que " 48 | Soit un exemple de scénario en français 49 | Lorsque j'ai 2 gâteaux 50 | Mais que quelqu'un me vole 1 gâteau 51 | Alors j'ai 1 gâteau 52 | 53 | Scénario: Support du mot-clef "Mais qu'" 54 | Soit un exemple de scénario en français 55 | Lorsque j'ai 2 gâteaux 56 | Mais qu'on me vole 1 gâteau 57 | Alors j'ai 1 gâteau 58 | 59 | Scénario: Support du mot-clef "Mais " 60 | Soit un exemple de scénario en français 61 | Quand j'ai 2 gâteaux 62 | Mais quelqu'un me vole 1 gâteau 63 | Alors j'ai 1 gâteau 64 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_fr.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scénario","location":{"column":3,"line":4},"name":"Support des caractères spéciaux","steps":[{"id":"0","keyword":"Soit ","location":{"column":5,"line":5},"text":"un exemple de scénario en français"},{"id":"1","keyword":"Quand ","location":{"column":5,"line":6},"text":"j'ai 1 gâteau"},{"id":"2","keyword":"Alors ","location":{"column":5,"line":7},"text":"je suis heureux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"7","keyword":"Scénario","location":{"column":3,"line":9},"name":"Support du mot-clef \"Etant donné que \"","steps":[{"id":"4","keyword":"Etant donné que ","location":{"column":5,"line":10},"text":"j'aime les gâteaux"},{"id":"5","keyword":"Lorsqu'","location":{"column":5,"line":11},"text":"on m'offre 1 gâteau"},{"id":"6","keyword":"Alors ","location":{"column":5,"line":12},"text":"je suis heureux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"11","keyword":"Scénario","location":{"column":3,"line":14},"name":"Support du mot-clef \"Etant donné qu'\"","steps":[{"id":"8","keyword":"Etant donné qu'","location":{"column":5,"line":15},"text":"offrir un gâteau rend heureux"},{"id":"9","keyword":"Lorsqu'","location":{"column":5,"line":16},"text":"on m'offre 1 gâteau"},{"id":"10","keyword":"Alors ","location":{"column":5,"line":17},"text":"je suis heureux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"15","keyword":"Scénario","location":{"column":3,"line":19},"name":"Support du mot-clef \"Étant donné que \"","steps":[{"id":"12","keyword":"Étant donné que ","location":{"column":5,"line":20},"text":"j'aime les gâteaux"},{"id":"13","keyword":"Lorsqu'","location":{"column":5,"line":21},"text":"on m'offre 1 gâteau"},{"id":"14","keyword":"Alors ","location":{"column":5,"line":22},"text":"je suis heureux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"19","keyword":"Scénario","location":{"column":3,"line":24},"name":"Support du mot-clef \"Étant donné qu'\"","steps":[{"id":"16","keyword":"Étant donné qu'","location":{"column":5,"line":25},"text":"offrir un gâteau rend heureux"},{"id":"17","keyword":"Lorsqu'","location":{"column":5,"line":26},"text":"on m'offre 1 gâteau"},{"id":"18","keyword":"Alors ","location":{"column":5,"line":27},"text":"je suis heureux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"24","keyword":"Scénario","location":{"column":3,"line":29},"name":"Support du mot-clef \"Et que \"","steps":[{"id":"20","keyword":"Soit ","location":{"column":5,"line":30},"text":"un exemple de scénario en français"},{"id":"21","keyword":"Lorsque ","location":{"column":5,"line":31},"text":"j'ai 2 gâteaux"},{"id":"22","keyword":"Et que ","location":{"column":5,"line":32},"text":"quelqu'un m'offre 1 gâteau"},{"id":"23","keyword":"Alors ","location":{"column":5,"line":33},"text":"j'ai 3 gâteaux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"29","keyword":"Scénario","location":{"column":3,"line":35},"name":"Support du mot-clef \"Et qu'\"","steps":[{"id":"25","keyword":"Soit ","location":{"column":5,"line":36},"text":"un exemple de scénario en français"},{"id":"26","keyword":"Lorsque ","location":{"column":5,"line":37},"text":"j'ai 2 gâteaux"},{"id":"27","keyword":"Et qu'","location":{"column":5,"line":38},"text":"on m'offre 1 gâteau"},{"id":"28","keyword":"Alors ","location":{"column":5,"line":39},"text":"j'ai 3 gâteaux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"34","keyword":"Scénario","location":{"column":3,"line":41},"name":"Support du mot-clef \"Et \"","steps":[{"id":"30","keyword":"Soit ","location":{"column":5,"line":42},"text":"un exemple de scénario en français"},{"id":"31","keyword":"Quand ","location":{"column":5,"line":43},"text":"j'ai 2 gâteaux"},{"id":"32","keyword":"Et ","location":{"column":5,"line":44},"text":"quelqu'un m'offre 1 gâteau"},{"id":"33","keyword":"Alors ","location":{"column":5,"line":45},"text":"j'ai 3 gâteaux"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"39","keyword":"Scénario","location":{"column":3,"line":47},"name":"Support du mot-clef \"Mais que \"","steps":[{"id":"35","keyword":"Soit ","location":{"column":5,"line":48},"text":"un exemple de scénario en français"},{"id":"36","keyword":"Lorsque ","location":{"column":5,"line":49},"text":"j'ai 2 gâteaux"},{"id":"37","keyword":"Mais que ","location":{"column":5,"line":50},"text":"quelqu'un me vole 1 gâteau"},{"id":"38","keyword":"Alors ","location":{"column":5,"line":51},"text":"j'ai 1 gâteau"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"44","keyword":"Scénario","location":{"column":3,"line":53},"name":"Support du mot-clef \"Mais qu'\"","steps":[{"id":"40","keyword":"Soit ","location":{"column":5,"line":54},"text":"un exemple de scénario en français"},{"id":"41","keyword":"Lorsque ","location":{"column":5,"line":55},"text":"j'ai 2 gâteaux"},{"id":"42","keyword":"Mais qu'","location":{"column":5,"line":56},"text":"on me vole 1 gâteau"},{"id":"43","keyword":"Alors ","location":{"column":5,"line":57},"text":"j'ai 1 gâteau"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"49","keyword":"Scénario","location":{"column":3,"line":59},"name":"Support du mot-clef \"Mais \"","steps":[{"id":"45","keyword":"Soit ","location":{"column":5,"line":60},"text":"un exemple de scénario en français"},{"id":"46","keyword":"Quand ","location":{"column":5,"line":61},"text":"j'ai 2 gâteaux"},{"id":"47","keyword":"Mais ","location":{"column":5,"line":62},"text":"quelqu'un me vole 1 gâteau"},{"id":"48","keyword":"Alors ","location":{"column":5,"line":63},"text":"j'ai 1 gâteau"}],"tags":[]}}],"description":"","keyword":"Fonctionnalité","language":"fr","location":{"column":1,"line":2},"name":"i18n support","tags":[]},"uri":"testdata/good/i18n_fr.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_fr.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"53","language":"fr","name":"Support des caractères spéciaux","steps":[{"astNodeIds":["0"],"id":"50","text":"un exemple de scénario en français"},{"astNodeIds":["1"],"id":"51","text":"j'ai 1 gâteau"},{"astNodeIds":["2"],"id":"52","text":"je suis heureux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 2 | {"pickle":{"astNodeIds":["7"],"id":"57","language":"fr","name":"Support du mot-clef \"Etant donné que \"","steps":[{"astNodeIds":["4"],"id":"54","text":"j'aime les gâteaux"},{"astNodeIds":["5"],"id":"55","text":"on m'offre 1 gâteau"},{"astNodeIds":["6"],"id":"56","text":"je suis heureux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 3 | {"pickle":{"astNodeIds":["11"],"id":"61","language":"fr","name":"Support du mot-clef \"Etant donné qu'\"","steps":[{"astNodeIds":["8"],"id":"58","text":"offrir un gâteau rend heureux"},{"astNodeIds":["9"],"id":"59","text":"on m'offre 1 gâteau"},{"astNodeIds":["10"],"id":"60","text":"je suis heureux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 4 | {"pickle":{"astNodeIds":["15"],"id":"65","language":"fr","name":"Support du mot-clef \"Étant donné que \"","steps":[{"astNodeIds":["12"],"id":"62","text":"j'aime les gâteaux"},{"astNodeIds":["13"],"id":"63","text":"on m'offre 1 gâteau"},{"astNodeIds":["14"],"id":"64","text":"je suis heureux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 5 | {"pickle":{"astNodeIds":["19"],"id":"69","language":"fr","name":"Support du mot-clef \"Étant donné qu'\"","steps":[{"astNodeIds":["16"],"id":"66","text":"offrir un gâteau rend heureux"},{"astNodeIds":["17"],"id":"67","text":"on m'offre 1 gâteau"},{"astNodeIds":["18"],"id":"68","text":"je suis heureux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 6 | {"pickle":{"astNodeIds":["24"],"id":"74","language":"fr","name":"Support du mot-clef \"Et que \"","steps":[{"astNodeIds":["20"],"id":"70","text":"un exemple de scénario en français"},{"astNodeIds":["21"],"id":"71","text":"j'ai 2 gâteaux"},{"astNodeIds":["22"],"id":"72","text":"quelqu'un m'offre 1 gâteau"},{"astNodeIds":["23"],"id":"73","text":"j'ai 3 gâteaux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 7 | {"pickle":{"astNodeIds":["29"],"id":"79","language":"fr","name":"Support du mot-clef \"Et qu'\"","steps":[{"astNodeIds":["25"],"id":"75","text":"un exemple de scénario en français"},{"astNodeIds":["26"],"id":"76","text":"j'ai 2 gâteaux"},{"astNodeIds":["27"],"id":"77","text":"on m'offre 1 gâteau"},{"astNodeIds":["28"],"id":"78","text":"j'ai 3 gâteaux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 8 | {"pickle":{"astNodeIds":["34"],"id":"84","language":"fr","name":"Support du mot-clef \"Et \"","steps":[{"astNodeIds":["30"],"id":"80","text":"un exemple de scénario en français"},{"astNodeIds":["31"],"id":"81","text":"j'ai 2 gâteaux"},{"astNodeIds":["32"],"id":"82","text":"quelqu'un m'offre 1 gâteau"},{"astNodeIds":["33"],"id":"83","text":"j'ai 3 gâteaux"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 9 | {"pickle":{"astNodeIds":["39"],"id":"89","language":"fr","name":"Support du mot-clef \"Mais que \"","steps":[{"astNodeIds":["35"],"id":"85","text":"un exemple de scénario en français"},{"astNodeIds":["36"],"id":"86","text":"j'ai 2 gâteaux"},{"astNodeIds":["37"],"id":"87","text":"quelqu'un me vole 1 gâteau"},{"astNodeIds":["38"],"id":"88","text":"j'ai 1 gâteau"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 10 | {"pickle":{"astNodeIds":["44"],"id":"94","language":"fr","name":"Support du mot-clef \"Mais qu'\"","steps":[{"astNodeIds":["40"],"id":"90","text":"un exemple de scénario en français"},{"astNodeIds":["41"],"id":"91","text":"j'ai 2 gâteaux"},{"astNodeIds":["42"],"id":"92","text":"on me vole 1 gâteau"},{"astNodeIds":["43"],"id":"93","text":"j'ai 1 gâteau"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 11 | {"pickle":{"astNodeIds":["49"],"id":"99","language":"fr","name":"Support du mot-clef \"Mais \"","steps":[{"astNodeIds":["45"],"id":"95","text":"un exemple de scénario en français"},{"astNodeIds":["46"],"id":"96","text":"j'ai 2 gâteaux"},{"astNodeIds":["47"],"id":"97","text":"quelqu'un me vole 1 gâteau"},{"astNodeIds":["48"],"id":"98","text":"j'ai 1 gâteau"}],"tags":[],"uri":"testdata/good/i18n_fr.feature"}} 12 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_fr.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"#language:fr\nFonctionnalité: i18n support\n\n Scénario: Support des caractères spéciaux\n Soit un exemple de scénario en français\n Quand j'ai 1 gâteau\n Alors je suis heureux\n\n Scénario: Support du mot-clef \"Etant donné que \"\n Etant donné que j'aime les gâteaux\n Lorsqu'on m'offre 1 gâteau\n Alors je suis heureux\n\n Scénario: Support du mot-clef \"Etant donné qu'\"\n Etant donné qu'offrir un gâteau rend heureux\n Lorsqu'on m'offre 1 gâteau\n Alors je suis heureux\n\n Scénario: Support du mot-clef \"Étant donné que \"\n Étant donné que j'aime les gâteaux \n Lorsqu'on m'offre 1 gâteau\n Alors je suis heureux\n\n Scénario: Support du mot-clef \"Étant donné qu'\"\n Étant donné qu'offrir un gâteau rend heureux\n Lorsqu'on m'offre 1 gâteau\n Alors je suis heureux\n\n Scénario: Support du mot-clef \"Et que \"\n Soit un exemple de scénario en français\n Lorsque j'ai 2 gâteaux\n Et que quelqu'un m'offre 1 gâteau\n Alors j'ai 3 gâteaux\n\n Scénario: Support du mot-clef \"Et qu'\"\n Soit un exemple de scénario en français\n Lorsque j'ai 2 gâteaux\n Et qu'on m'offre 1 gâteau\n Alors j'ai 3 gâteaux\n\n Scénario: Support du mot-clef \"Et \"\n Soit un exemple de scénario en français\n Quand j'ai 2 gâteaux\n Et quelqu'un m'offre 1 gâteau\n Alors j'ai 3 gâteaux\n\n Scénario: Support du mot-clef \"Mais que \"\n Soit un exemple de scénario en français\n Lorsque j'ai 2 gâteaux\n Mais que quelqu'un me vole 1 gâteau\n Alors j'ai 1 gâteau\n\n Scénario: Support du mot-clef \"Mais qu'\"\n Soit un exemple de scénario en français\n Lorsque j'ai 2 gâteaux\n Mais qu'on me vole 1 gâteau\n Alors j'ai 1 gâteau\n\n Scénario: Support du mot-clef \"Mais \"\n Soit un exemple de scénario en français\n Quand j'ai 2 gâteaux\n Mais quelqu'un me vole 1 gâteau\n Alors j'ai 1 gâteau\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/i18n_fr.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_fr.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)Language:/fr/ 2 | (2:1)FeatureLine:Fonctionnalité/i18n support/ 3 | (3:1)Empty:// 4 | (4:3)ScenarioLine:Scénario/Support des caractères spéciaux/ 5 | (5:5)StepLine:Soit /un exemple de scénario en français/ 6 | (6:5)StepLine:Quand /j'ai 1 gâteau/ 7 | (7:5)StepLine:Alors /je suis heureux/ 8 | (8:1)Empty:// 9 | (9:3)ScenarioLine:Scénario/Support du mot-clef "Etant donné que "/ 10 | (10:5)StepLine:Etant donné que /j'aime les gâteaux/ 11 | (11:5)StepLine:Lorsqu'/on m'offre 1 gâteau/ 12 | (12:5)StepLine:Alors /je suis heureux/ 13 | (13:1)Empty:// 14 | (14:3)ScenarioLine:Scénario/Support du mot-clef "Etant donné qu'"/ 15 | (15:5)StepLine:Etant donné qu'/offrir un gâteau rend heureux/ 16 | (16:5)StepLine:Lorsqu'/on m'offre 1 gâteau/ 17 | (17:5)StepLine:Alors /je suis heureux/ 18 | (18:1)Empty:// 19 | (19:3)ScenarioLine:Scénario/Support du mot-clef "Étant donné que "/ 20 | (20:5)StepLine:Étant donné que /j'aime les gâteaux/ 21 | (21:5)StepLine:Lorsqu'/on m'offre 1 gâteau/ 22 | (22:5)StepLine:Alors /je suis heureux/ 23 | (23:1)Empty:// 24 | (24:3)ScenarioLine:Scénario/Support du mot-clef "Étant donné qu'"/ 25 | (25:5)StepLine:Étant donné qu'/offrir un gâteau rend heureux/ 26 | (26:5)StepLine:Lorsqu'/on m'offre 1 gâteau/ 27 | (27:5)StepLine:Alors /je suis heureux/ 28 | (28:1)Empty:// 29 | (29:3)ScenarioLine:Scénario/Support du mot-clef "Et que "/ 30 | (30:5)StepLine:Soit /un exemple de scénario en français/ 31 | (31:5)StepLine:Lorsque /j'ai 2 gâteaux/ 32 | (32:5)StepLine:Et que /quelqu'un m'offre 1 gâteau/ 33 | (33:5)StepLine:Alors /j'ai 3 gâteaux/ 34 | (34:1)Empty:// 35 | (35:3)ScenarioLine:Scénario/Support du mot-clef "Et qu'"/ 36 | (36:5)StepLine:Soit /un exemple de scénario en français/ 37 | (37:5)StepLine:Lorsque /j'ai 2 gâteaux/ 38 | (38:5)StepLine:Et qu'/on m'offre 1 gâteau/ 39 | (39:5)StepLine:Alors /j'ai 3 gâteaux/ 40 | (40:1)Empty:// 41 | (41:3)ScenarioLine:Scénario/Support du mot-clef "Et "/ 42 | (42:5)StepLine:Soit /un exemple de scénario en français/ 43 | (43:5)StepLine:Quand /j'ai 2 gâteaux/ 44 | (44:5)StepLine:Et /quelqu'un m'offre 1 gâteau/ 45 | (45:5)StepLine:Alors /j'ai 3 gâteaux/ 46 | (46:1)Empty:// 47 | (47:3)ScenarioLine:Scénario/Support du mot-clef "Mais que "/ 48 | (48:5)StepLine:Soit /un exemple de scénario en français/ 49 | (49:5)StepLine:Lorsque /j'ai 2 gâteaux/ 50 | (50:5)StepLine:Mais que /quelqu'un me vole 1 gâteau/ 51 | (51:5)StepLine:Alors /j'ai 1 gâteau/ 52 | (52:1)Empty:// 53 | (53:3)ScenarioLine:Scénario/Support du mot-clef "Mais qu'"/ 54 | (54:5)StepLine:Soit /un exemple de scénario en français/ 55 | (55:5)StepLine:Lorsque /j'ai 2 gâteaux/ 56 | (56:5)StepLine:Mais qu'/on me vole 1 gâteau/ 57 | (57:5)StepLine:Alors /j'ai 1 gâteau/ 58 | (58:1)Empty:// 59 | (59:3)ScenarioLine:Scénario/Support du mot-clef "Mais "/ 60 | (60:5)StepLine:Soit /un exemple de scénario en français/ 61 | (61:5)StepLine:Quand /j'ai 2 gâteaux/ 62 | (62:5)StepLine:Mais /quelqu'un me vole 1 gâteau/ 63 | (63:5)StepLine:Alors /j'ai 1 gâteau/ 64 | EOF 65 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_no.feature: -------------------------------------------------------------------------------- 1 | #language:no 2 | Egenskap: i18n support 3 | 4 | Scenario: Parsing many languages 5 | Gitt Gherkin supports many languages 6 | Når Norwegian keywords are parsed 7 | Så they should be recognized 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_no.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario","location":{"column":3,"line":4},"name":"Parsing many languages","steps":[{"id":"0","keyword":"Gitt ","location":{"column":5,"line":5},"text":"Gherkin supports many languages"},{"id":"1","keyword":"Når ","location":{"column":5,"line":6},"text":"Norwegian keywords are parsed"},{"id":"2","keyword":"Så ","location":{"column":5,"line":7},"text":"they should be recognized"}],"tags":[]}}],"description":"","keyword":"Egenskap","language":"no","location":{"column":1,"line":2},"name":"i18n support","tags":[]},"uri":"testdata/good/i18n_no.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_no.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"7","language":"no","name":"Parsing many languages","steps":[{"astNodeIds":["0"],"id":"4","text":"Gherkin supports many languages"},{"astNodeIds":["1"],"id":"5","text":"Norwegian keywords are parsed"},{"astNodeIds":["2"],"id":"6","text":"they should be recognized"}],"tags":[],"uri":"testdata/good/i18n_no.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_no.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"#language:no\nEgenskap: i18n support\n\n Scenario: Parsing many languages\n Gitt Gherkin supports many languages\n Når Norwegian keywords are parsed\n Så they should be recognized\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/i18n_no.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/i18n_no.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)Language:/no/ 2 | (2:1)FeatureLine:Egenskap/i18n support/ 3 | (3:1)Empty:// 4 | (4:3)ScenarioLine:Scenario/Parsing many languages/ 5 | (5:5)StepLine:Gitt /Gherkin supports many languages/ 6 | (6:5)StepLine:Når /Norwegian keywords are parsed/ 7 | (7:5)StepLine:Så /they should be recognized/ 8 | EOF 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_1.feature: -------------------------------------------------------------------------------- 1 | Feature: Incomplete backgrounds, Part 1 2 | 3 | Background: no steps 4 | 5 | Scenario: still pickles up 6 | * a step 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_1.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":"","id":"0","keyword":"Background","location":{"column":3,"line":3},"name":"no steps","steps":[]}},{"scenario":{"description":"","examples":[],"id":"2","keyword":"Scenario","location":{"column":3,"line":5},"name":"still pickles up","steps":[{"id":"1","keyword":"* ","location":{"column":5,"line":6},"text":"a step"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Incomplete backgrounds, Part 1","tags":[]},"uri":"testdata/good/incomplete_background_1.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_1.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["2"],"id":"4","language":"en","name":"still pickles up","steps":[{"astNodeIds":["1"],"id":"3","text":"a step"}],"tags":[],"uri":"testdata/good/incomplete_background_1.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_1.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Incomplete backgrounds, Part 1\n\n Background: no steps\n\n Scenario: still pickles up\n * a step\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_background_1.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_1.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Incomplete backgrounds, Part 1/ 2 | (2:1)Empty:// 3 | (3:3)BackgroundLine:Background/no steps/ 4 | (4:1)Empty:// 5 | (5:3)ScenarioLine:Scenario/still pickles up/ 6 | (6:5)StepLine:* /a step/ 7 | EOF 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_2.feature: -------------------------------------------------------------------------------- 1 | Feature: Incomplete backgrounds, Part 2 2 | 3 | Background: just a description 4 | A short description 5 | 6 | Scenario: still pickles up 7 | * a step 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_2.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":" A short description","id":"0","keyword":"Background","location":{"column":3,"line":3},"name":"just a description","steps":[]}},{"scenario":{"description":"","examples":[],"id":"2","keyword":"Scenario","location":{"column":3,"line":6},"name":"still pickles up","steps":[{"id":"1","keyword":"* ","location":{"column":5,"line":7},"text":"a step"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Incomplete backgrounds, Part 2","tags":[]},"uri":"testdata/good/incomplete_background_2.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_2.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["2"],"id":"4","language":"en","name":"still pickles up","steps":[{"astNodeIds":["1"],"id":"3","text":"a step"}],"tags":[],"uri":"testdata/good/incomplete_background_2.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_2.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Incomplete backgrounds, Part 2\n\n Background: just a description\n A short description\n\n Scenario: still pickles up\n * a step\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_background_2.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_background_2.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Incomplete backgrounds, Part 2/ 2 | (2:1)Empty:// 3 | (3:3)BackgroundLine:Background/just a description/ 4 | (4:1)Other:/ A short description/ 5 | (5:1)Other:// 6 | (6:3)ScenarioLine:Scenario/still pickles up/ 7 | (7:5)StepLine:* /a step/ 8 | EOF 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_1.feature: -------------------------------------------------------------------------------- 1 | Feature: Just a description 2 | A short description 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_1.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[],"description":" A short description","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Just a description","tags":[]},"uri":"testdata/good/incomplete_feature_1.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_1.feature.pickles.ndjson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cucumber-rs/gherkin/fd6fcd335e01907d93903a83fd331dd529e5b3b2/tests/fixtures/data/good/incomplete_feature_1.feature.pickles.ndjson -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_1.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Just a description\n A short description\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_feature_1.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_1.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Just a description/ 2 | (2:1)Other:/ A short description/ 3 | EOF 4 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_2.feature: -------------------------------------------------------------------------------- 1 | Feature: Empty feature 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_2.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Empty feature","tags":[]},"uri":"testdata/good/incomplete_feature_2.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_2.feature.pickles.ndjson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cucumber-rs/gherkin/fd6fcd335e01907d93903a83fd331dd529e5b3b2/tests/fixtures/data/good/incomplete_feature_2.feature.pickles.ndjson -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_2.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Empty feature\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_feature_2.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_2.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Empty feature/ 2 | EOF 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_3.feature: -------------------------------------------------------------------------------- 1 | # Just a comment -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_3.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[{"location":{"column":1,"line":1},"text":"# Just a comment"}],"uri":"testdata/good/incomplete_feature_3.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_3.feature.pickles.ndjson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cucumber-rs/gherkin/fd6fcd335e01907d93903a83fd331dd529e5b3b2/tests/fixtures/data/good/incomplete_feature_3.feature.pickles.ndjson -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_3.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"# Just a comment","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_feature_3.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_feature_3.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)Comment:/# Just a comment/ 2 | EOF 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario.feature: -------------------------------------------------------------------------------- 1 | Feature: Incomplete scenarios 2 | 3 | Background: Adding a background won't make a pickle 4 | * a step 5 | 6 | Scenario: no steps 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":"","id":"1","keyword":"Background","location":{"column":3,"line":3},"name":"Adding a background won't make a pickle","steps":[{"id":"0","keyword":"* ","location":{"column":5,"line":4},"text":"a step"}]}},{"scenario":{"description":"","examples":[],"id":"2","keyword":"Scenario","location":{"column":3,"line":6},"name":"no steps","steps":[],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Incomplete scenarios","tags":[]},"uri":"testdata/good/incomplete_scenario.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["2"],"id":"3","language":"en","name":"no steps","steps":[],"tags":[],"uri":"testdata/good/incomplete_scenario.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Incomplete scenarios\n\n Background: Adding a background won't make a pickle\n * a step\n\n Scenario: no steps\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_scenario.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Incomplete scenarios/ 2 | (2:1)Empty:// 3 | (3:3)BackgroundLine:Background/Adding a background won't make a pickle/ 4 | (4:5)StepLine:* /a step/ 5 | (5:1)Empty:// 6 | (6:3)ScenarioLine:Scenario/no steps/ 7 | EOF 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario_outline.feature: -------------------------------------------------------------------------------- 1 | Feature: Incomplete scenario outlines 2 | 3 | Background: Adding a background won't make a pickle 4 | * a step 5 | 6 | Scenario Outline: steps, no examples 7 | Given a step 8 | 9 | Scenario Outline: no steps, no examples 10 | 11 | Scenario Outline: no steps, no table 12 | 13 | Examples: 14 | 15 | Scenario Outline: no steps, only table header 16 | 17 | Examples: 18 | | what | 19 | 20 | Scenario Outline: no steps, one example header 21 | 22 | Examples: 23 | | nope | 24 | | nada | 25 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario_outline.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":"","id":"1","keyword":"Background","location":{"column":3,"line":3},"name":"Adding a background won't make a pickle","steps":[{"id":"0","keyword":"* ","location":{"column":5,"line":4},"text":"a step"}]}},{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario Outline","location":{"column":3,"line":6},"name":"steps, no examples","steps":[{"id":"2","keyword":"Given ","location":{"column":5,"line":7},"text":"a step"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"4","keyword":"Scenario Outline","location":{"column":3,"line":9},"name":"no steps, no examples","steps":[],"tags":[]}},{"scenario":{"description":"","examples":[{"description":"","id":"5","keyword":"Examples","location":{"column":5,"line":13},"name":"","tableBody":[],"tags":[]}],"id":"6","keyword":"Scenario Outline","location":{"column":3,"line":11},"name":"no steps, no table","steps":[],"tags":[]}},{"scenario":{"description":"","examples":[{"description":"","id":"8","keyword":"Examples","location":{"column":5,"line":17},"name":"","tableBody":[],"tableHeader":{"cells":[{"location":{"column":7,"line":18},"value":"what"}],"id":"7","location":{"column":5,"line":18}},"tags":[]}],"id":"9","keyword":"Scenario Outline","location":{"column":3,"line":15},"name":"no steps, only table header","steps":[],"tags":[]}},{"scenario":{"description":"","examples":[{"description":"","id":"12","keyword":"Examples","location":{"column":5,"line":22},"name":"","tableBody":[{"cells":[{"location":{"column":7,"line":24},"value":"nada"}],"id":"11","location":{"column":5,"line":24}}],"tableHeader":{"cells":[{"location":{"column":7,"line":23},"value":"nope"}],"id":"10","location":{"column":5,"line":23}},"tags":[]}],"id":"13","keyword":"Scenario Outline","location":{"column":3,"line":20},"name":"no steps, one example header","steps":[],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Incomplete scenario outlines","tags":[]},"uri":"testdata/good/incomplete_scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario_outline.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"16","language":"en","name":"steps, no examples","steps":[{"astNodeIds":["0"],"id":"14","text":"a step"},{"astNodeIds":["2"],"id":"15","text":"a step"}],"tags":[],"uri":"testdata/good/incomplete_scenario_outline.feature"}} 2 | {"pickle":{"astNodeIds":["4"],"id":"17","language":"en","name":"no steps, no examples","steps":[],"tags":[],"uri":"testdata/good/incomplete_scenario_outline.feature"}} 3 | {"pickle":{"astNodeIds":["13","11"],"id":"18","language":"en","name":"no steps, one example header","steps":[],"tags":[],"uri":"testdata/good/incomplete_scenario_outline.feature"}} 4 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario_outline.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Incomplete scenario outlines\n\n Background: Adding a background won't make a pickle\n * a step\n\n Scenario Outline: steps, no examples\n Given a step\n\n Scenario Outline: no steps, no examples\n\n Scenario Outline: no steps, no table\n\n Examples:\n\n Scenario Outline: no steps, only table header\n\n Examples:\n | what |\n\n Scenario Outline: no steps, one example header\n\n Examples:\n | nope |\n | nada |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/incomplete_scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/incomplete_scenario_outline.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Incomplete scenario outlines/ 2 | (2:1)Empty:// 3 | (3:3)BackgroundLine:Background/Adding a background won't make a pickle/ 4 | (4:5)StepLine:* /a step/ 5 | (5:1)Empty:// 6 | (6:3)ScenarioLine:Scenario Outline/steps, no examples/ 7 | (7:5)StepLine:Given /a step/ 8 | (8:1)Empty:// 9 | (9:3)ScenarioLine:Scenario Outline/no steps, no examples/ 10 | (10:1)Empty:// 11 | (11:3)ScenarioLine:Scenario Outline/no steps, no table/ 12 | (12:1)Empty:// 13 | (13:5)ExamplesLine:Examples// 14 | (14:1)Empty:// 15 | (15:3)ScenarioLine:Scenario Outline/no steps, only table header/ 16 | (16:1)Empty:// 17 | (17:5)ExamplesLine:Examples// 18 | (18:5)TableRow://7:what 19 | (19:1)Empty:// 20 | (20:3)ScenarioLine:Scenario Outline/no steps, one example header/ 21 | (21:1)Empty:// 22 | (22:5)ExamplesLine:Examples// 23 | (23:5)TableRow://7:nope 24 | (24:5)TableRow://7:nada 25 | EOF 26 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/language.feature: -------------------------------------------------------------------------------- 1 | #language:en 2 | 3 | Feature: Explicit language specification 4 | 5 | Scenario: minimalistic 6 | Given the minimalism 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/language.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":3,"line":5},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":6},"text":"the minimalism"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":3},"name":"Explicit language specification","tags":[]},"uri":"testdata/good/language.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/language.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"3","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"2","text":"the minimalism"}],"tags":[],"uri":"testdata/good/language.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/language.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"#language:en\n\nFeature: Explicit language specification\n\n Scenario: minimalistic\n Given the minimalism\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/language.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/language.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)Language:/en/ 2 | (2:1)Empty:// 3 | (3:1)FeatureLine:Feature/Explicit language specification/ 4 | (4:1)Empty:// 5 | (5:3)ScenarioLine:Scenario/minimalistic/ 6 | (6:5)StepLine:Given /the minimalism/ 7 | EOF 8 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal-example.feature: -------------------------------------------------------------------------------- 1 | Feature: Minimal 2 | 3 | Example: minimalistic 4 | Given the minimalism 5 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal-example.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Example","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the minimalism"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Minimal","tags":[]},"uri":"testdata/good/minimal-example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal-example.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"3","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"2","text":"the minimalism"}],"tags":[],"uri":"testdata/good/minimal-example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal-example.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Minimal\n\n Example: minimalistic\n Given the minimalism\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/minimal-example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal-example.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Minimal/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Example/minimalistic/ 4 | (4:5)StepLine:Given /the minimalism/ 5 | EOF 6 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature: -------------------------------------------------------------------------------- 1 | Feature: Minimal 2 | 3 | Scenario: minimalistic 4 | Given the minimalism 5 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the minimalism"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Minimal","tags":[]},"uri":"testdata/good/minimal.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.md: -------------------------------------------------------------------------------- 1 | # Feature: Minimal 2 | 3 | ## Scenario: minimalistic 4 | 5 | * Given the minimalism 6 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.md.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":4,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":6,"line":5},"text":"the minimalism"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":3,"line":1},"name":"Minimal","tags":[]},"uri":"testdata/good/minimal.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.md.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"3","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"2","text":"the minimalism"}],"tags":[],"uri":"testdata/good/minimal.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.md.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"# Feature: Minimal\n\n## Scenario: minimalistic\n\n * Given the minimalism\n","mediaType":"text/x.cucumber.gherkin+markdown","uri":"testdata/good/minimal.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"3","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"2","text":"the minimalism"}],"tags":[],"uri":"testdata/good/minimal.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Minimal\n\n Scenario: minimalistic\n Given the minimalism\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/minimal.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/minimal.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Minimal/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario/minimalistic/ 4 | (4:5)StepLine:Given /the minimalism/ 5 | EOF 6 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/misc.feature.md: -------------------------------------------------------------------------------- 1 | Markdown document without "# Feature:" header 2 | =========================================== 3 | 4 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 5 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 6 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 7 | consequat. 8 | 9 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 10 | fugiat nulla pariatur. 11 | 12 | # Scenario: Something about math 13 | * Given step one 14 | * When step two 15 | * Then step three 16 | 17 | # Scenario: Something about gravity 18 | - Given step one 19 | - When step two 20 | - Then step three 21 | 22 | # The world is wet 23 | 24 | Excepteur sint occaecat cupidatat non proident, sunt in 25 | culpa qui officia deserunt mollit anim id est laborum. 26 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/misc.feature.md.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario","location":{"column":3,"line":12},"name":"Something about math","steps":[{"id":"0","keyword":"Given ","location":{"column":3,"line":13},"text":"step one"},{"id":"1","keyword":"When ","location":{"column":3,"line":14},"text":"step two"},{"id":"2","keyword":"Then ","location":{"column":3,"line":15},"text":"step three"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"7","keyword":"Scenario","location":{"column":3,"line":17},"name":"Something about gravity","steps":[{"id":"4","keyword":"Given ","location":{"column":4,"line":18},"text":"step one"},{"id":"5","keyword":"When ","location":{"column":4,"line":19},"text":"step two"},{"id":"6","keyword":"Then ","location":{"column":4,"line":20},"text":"step three"}],"tags":[]}}],"description":"","language":"en","location":{"column":1,"line":1},"name":"Markdown document without \"# Feature:\" header","tags":[]},"uri":"testdata/good/misc.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/misc.feature.md.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["3"],"id":"11","language":"en","name":"Something about math","steps":[{"astNodeIds":["0"],"id":"8","text":"step one"},{"astNodeIds":["1"],"id":"9","text":"step two"},{"astNodeIds":["2"],"id":"10","text":"step three"}],"tags":[],"uri":"testdata/good/misc.feature.md"}} 2 | {"pickle":{"astNodeIds":["7"],"id":"15","language":"en","name":"Something about gravity","steps":[{"astNodeIds":["4"],"id":"12","text":"step one"},{"astNodeIds":["5"],"id":"13","text":"step two"},{"astNodeIds":["6"],"id":"14","text":"step three"}],"tags":[],"uri":"testdata/good/misc.feature.md"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/misc.feature.md.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Markdown document without \"# Feature:\" header\n===========================================\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat.\n\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur.\n\n# Scenario: Something about math\n* Given step one\n* When step two\n* Then step three\n\n# Scenario: Something about gravity\n - Given step one\n - When step two\n - Then step three\n\n# The world is wet\n\nExcepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n","mediaType":"text/x.cucumber.gherkin+markdown","uri":"testdata/good/misc.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/padded_example.feature: -------------------------------------------------------------------------------- 1 | Feature: test 2 | 3 | Scenario: test 4 | Given a ball with: 5 | | type | diameter | 6 | | football | 69 | 7 | | pool | 5.6 | 8 | 9 | 10 | # The "red" cell below has the following whitespace characters on each side: 11 | # - U+00A0 (non-breaking space) 12 | # - U+0020 (space) 13 | # - U+0009 (tab) 14 | # This is generated with `ruby -e 'STDOUT.write "\u00A0\u0020\u0009".encode("utf-8")' | pbcopy` 15 | # and pasted. 16 | Examples: 17 | | color | 18 | |  red  | 19 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/padded_example.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[{"location":{"column":1,"line":10},"text":" # The \"red\" cell below has the following whitespace characters on each side:"},{"location":{"column":1,"line":11},"text":" # - U+00A0 (non-breaking space)"},{"location":{"column":1,"line":12},"text":" # - U+0020 (space)"},{"location":{"column":1,"line":13},"text":" # - U+0009 (tab)"},{"location":{"column":1,"line":14},"text":" # This is generated with `ruby -e 'STDOUT.write \"\\u00A0\\u0020\\u0009\".encode(\"utf-8\")' | pbcopy`"},{"location":{"column":1,"line":15},"text":" # and pasted. "}],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"6","keyword":"Examples","location":{"column":5,"line":16},"name":"","tableBody":[{"cells":[{"location":{"column":11,"line":18},"value":"red"}],"id":"5","location":{"column":7,"line":18}}],"tableHeader":{"cells":[{"location":{"column":9,"line":17},"value":"color"}],"id":"4","location":{"column":7,"line":17}},"tags":[]}],"id":"7","keyword":"Scenario","location":{"column":3,"line":3},"name":"test","steps":[{"dataTable":{"location":{"column":7,"line":5},"rows":[{"cells":[{"location":{"column":9,"line":5},"value":"type"},{"location":{"column":20,"line":5},"value":"diameter"}],"id":"0","location":{"column":7,"line":5}},{"cells":[{"location":{"column":9,"line":6},"value":"football"},{"location":{"column":26,"line":6},"value":"69"}],"id":"1","location":{"column":7,"line":6}},{"cells":[{"location":{"column":11,"line":7},"value":"pool"},{"location":{"column":25,"line":7},"value":"5.6"}],"id":"2","location":{"column":7,"line":7}}]},"id":"3","keyword":"Given ","location":{"column":5,"line":4},"text":"a ball with:"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"test","tags":[]},"uri":"testdata/good/padded_example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/padded_example.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["7","5"],"id":"9","language":"en","name":"test","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"type"},{"value":"diameter"}]},{"cells":[{"value":"football"},{"value":"69"}]},{"cells":[{"value":"pool"},{"value":"5.6"}]}]}},"astNodeIds":["3","5"],"id":"8","text":"a red ball with:"}],"tags":[],"uri":"testdata/good/padded_example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/padded_example.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: test\n\n Scenario: test\n Given a ball with:\n | type | diameter |\n | football | 69 |\n | pool | 5.6 |\n\n\n # The \"red\" cell below has the following whitespace characters on each side:\n # - U+00A0 (non-breaking space)\n # - U+0020 (space)\n # - U+0009 (tab)\n # This is generated with `ruby -e 'STDOUT.write \"\\u00A0\\u0020\\u0009\".encode(\"utf-8\")' | pbcopy`\n # and pasted. \n Examples:\n | color |\n |  \tred  \t|\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/padded_example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/padded_example.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/test/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario/test/ 4 | (4:5)StepLine:Given /a ball with:/ 5 | (5:7)TableRow://9:type,20:diameter 6 | (6:7)TableRow://9:football,26:69 7 | (7:7)TableRow://11:pool,25:5.6 8 | (8:1)Empty:// 9 | (9:1)Empty:// 10 | (10:1)Comment:/ # The "red" cell below has the following whitespace characters on each side:/ 11 | (11:1)Comment:/ # - U+00A0 (non-breaking space)/ 12 | (12:1)Comment:/ # - U+0020 (space)/ 13 | (13:1)Comment:/ # - U+0009 (tab)/ 14 | (14:1)Comment:/ # This is generated with `ruby -e 'STDOUT.write "\u00A0\u0020\u0009".encode("utf-8")' | pbcopy`/ 15 | (15:1)Comment:/ # and pasted. / 16 | (16:5)ExamplesLine:Examples// 17 | (17:7)TableRow://9:color 18 | (18:7)TableRow://11:red 19 | EOF 20 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/readme_example.feature: -------------------------------------------------------------------------------- 1 | @a 2 | Feature: 3 | @b @c 4 | Scenario Outline: 5 | Given 6 | 7 | Examples: 8 | | x | 9 | | y | 10 | 11 | @d @e 12 | Scenario Outline: 13 | Given 14 | 15 | @f 16 | Examples: 17 | | m | 18 | | n | 19 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/readme_example.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"3","keyword":"Examples","location":{"column":5,"line":7},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":9},"value":"y"}],"id":"2","location":{"column":7,"line":9}}],"tableHeader":{"cells":[{"location":{"column":9,"line":8},"value":"x"}],"id":"1","location":{"column":7,"line":8}},"tags":[]}],"id":"6","keyword":"Scenario Outline","location":{"column":3,"line":4},"name":"","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":5},"text":""}],"tags":[{"id":"4","location":{"column":3,"line":3},"name":"@b"},{"id":"5","location":{"column":6,"line":3},"name":"@c"}]}},{"scenario":{"description":"","examples":[{"description":"","id":"11","keyword":"Examples","location":{"column":5,"line":16},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":18},"value":"n"}],"id":"9","location":{"column":7,"line":18}}],"tableHeader":{"cells":[{"location":{"column":9,"line":17},"value":"m"}],"id":"8","location":{"column":7,"line":17}},"tags":[{"id":"10","location":{"column":5,"line":15},"name":"@f"}]}],"id":"14","keyword":"Scenario Outline","location":{"column":3,"line":12},"name":"","steps":[{"id":"7","keyword":"Given ","location":{"column":5,"line":13},"text":""}],"tags":[{"id":"12","location":{"column":3,"line":11},"name":"@d"},{"id":"13","location":{"column":6,"line":11},"name":"@e"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":2},"name":"","tags":[{"id":"15","location":{"column":1,"line":1},"name":"@a"}]},"uri":"testdata/good/readme_example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/readme_example.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["6","2"],"id":"17","language":"en","name":"","steps":[{"astNodeIds":["0","2"],"id":"16","text":"y"}],"tags":[{"astNodeId":"15","name":"@a"},{"astNodeId":"4","name":"@b"},{"astNodeId":"5","name":"@c"}],"uri":"testdata/good/readme_example.feature"}} 2 | {"pickle":{"astNodeIds":["14","9"],"id":"19","language":"en","name":"","steps":[{"astNodeIds":["7","9"],"id":"18","text":"n"}],"tags":[{"astNodeId":"15","name":"@a"},{"astNodeId":"12","name":"@d"},{"astNodeId":"13","name":"@e"},{"astNodeId":"10","name":"@f"}],"uri":"testdata/good/readme_example.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/readme_example.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"@a\nFeature:\n @b @c\n Scenario Outline:\n Given \n\n Examples:\n | x |\n | y |\n\n @d @e\n Scenario Outline:\n Given \n\n @f\n Examples:\n | m |\n | n |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/readme_example.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/readme_example.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)TagLine://1:@a 2 | (2:1)FeatureLine:Feature// 3 | (3:3)TagLine://3:@b,6:@c 4 | (4:3)ScenarioLine:Scenario Outline// 5 | (5:5)StepLine:Given // 6 | (6:1)Empty:// 7 | (7:5)ExamplesLine:Examples// 8 | (8:7)TableRow://9:x 9 | (9:7)TableRow://9:y 10 | (10:1)Empty:// 11 | (11:3)TagLine://3:@d,6:@e 12 | (12:3)ScenarioLine:Scenario Outline// 13 | (13:5)StepLine:Given // 14 | (14:1)Empty:// 15 | (15:5)TagLine://5:@f 16 | (16:5)ExamplesLine:Examples// 17 | (17:7)TableRow://9:m 18 | (18:7)TableRow://9:n 19 | EOF 20 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule.feature: -------------------------------------------------------------------------------- 1 | Feature: Some rules 2 | 3 | Background: 4 | Given fb 5 | 6 | Rule: A 7 | The rule A description 8 | 9 | Background: 10 | Given ab 11 | 12 | Example: Example A 13 | Given a 14 | 15 | Rule: B 16 | The rule B description 17 | 18 | Example: Example B 19 | Given b -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"background":{"description":"","id":"1","keyword":"Background","location":{"column":3,"line":3},"name":"","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"fb"}]}},{"rule":{"children":[{"background":{"description":"","id":"3","keyword":"Background","location":{"column":5,"line":9},"name":"","steps":[{"id":"2","keyword":"Given ","location":{"column":7,"line":10},"text":"ab"}]}},{"scenario":{"description":"","examples":[],"id":"5","keyword":"Example","location":{"column":5,"line":12},"name":"Example A","steps":[{"id":"4","keyword":"Given ","location":{"column":7,"line":13},"text":"a"}],"tags":[]}}],"description":" The rule A description","id":"6","keyword":"Rule","location":{"column":3,"line":6},"name":"A","tags":[]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"8","keyword":"Example","location":{"column":5,"line":18},"name":"Example B","steps":[{"id":"7","keyword":"Given ","location":{"column":7,"line":19},"text":"b"}],"tags":[]}}],"description":" The rule B description","id":"9","keyword":"Rule","location":{"column":3,"line":15},"name":"B","tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Some rules","tags":[]},"uri":"testdata/good/rule.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["5"],"id":"13","language":"en","name":"Example A","steps":[{"astNodeIds":["0"],"id":"10","text":"fb"},{"astNodeIds":["2"],"id":"11","text":"ab"},{"astNodeIds":["4"],"id":"12","text":"a"}],"tags":[],"uri":"testdata/good/rule.feature"}} 2 | {"pickle":{"astNodeIds":["8"],"id":"16","language":"en","name":"Example B","steps":[{"astNodeIds":["0"],"id":"14","text":"fb"},{"astNodeIds":["7"],"id":"15","text":"b"}],"tags":[],"uri":"testdata/good/rule.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Some rules\n\n Background:\n Given fb\n\n Rule: A\n The rule A description\n\n Background:\n Given ab\n\n Example: Example A\n Given a\n\n Rule: B\n The rule B description\n\n Example: Example B\n Given b","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/rule.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Some rules/ 2 | (2:1)Empty:// 3 | (3:3)BackgroundLine:Background// 4 | (4:5)StepLine:Given /fb/ 5 | (5:1)Empty:// 6 | (6:3)RuleLine:Rule/A/ 7 | (7:1)Other:/ The rule A description/ 8 | (8:1)Other:// 9 | (9:5)BackgroundLine:Background// 10 | (10:7)StepLine:Given /ab/ 11 | (11:1)Empty:// 12 | (12:5)ScenarioLine:Example/Example A/ 13 | (13:7)StepLine:Given /a/ 14 | (14:1)Empty:// 15 | (15:3)RuleLine:Rule/B/ 16 | (16:1)Other:/ The rule B description/ 17 | (17:1)Other:// 18 | (18:5)ScenarioLine:Example/Example B/ 19 | (19:7)StepLine:Given /b/ 20 | EOF 21 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_with_tag.feature: -------------------------------------------------------------------------------- 1 | @tag_feature 2 | Feature: Some tagged rules 3 | 4 | Rule: Untagged rule 5 | The untagged rule description 6 | 7 | Scenario: Scenario with only a feature tag 8 | Given a 9 | 10 | @tag_rule 11 | Rule: Tagged rule 12 | The tagged rule description 13 | 14 | Scenario: Scenario with feature and rule tags 15 | Given b 16 | 17 | @tag_scenario 18 | Scenario: Scenario with feature, rule and scenario tags 19 | Given b 20 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_with_tag.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":5,"line":7},"name":"Scenario with only a feature tag","steps":[{"id":"0","keyword":"Given ","location":{"column":7,"line":8},"text":"a"}],"tags":[]}}],"description":" The untagged rule description","id":"2","keyword":"Rule","location":{"column":3,"line":4},"name":"Untagged rule","tags":[]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"4","keyword":"Scenario","location":{"column":5,"line":14},"name":"Scenario with feature and rule tags","steps":[{"id":"3","keyword":"Given ","location":{"column":7,"line":15},"text":"b"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"7","keyword":"Scenario","location":{"column":5,"line":18},"name":"Scenario with feature, rule and scenario tags","steps":[{"id":"5","keyword":"Given ","location":{"column":7,"line":19},"text":"b"}],"tags":[{"id":"6","location":{"column":5,"line":17},"name":"@tag_scenario"}]}}],"description":" The tagged rule description","id":"9","keyword":"Rule","location":{"column":3,"line":11},"name":"Tagged rule","tags":[{"id":"8","location":{"column":3,"line":10},"name":"@tag_rule"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":2},"name":"Some tagged rules","tags":[{"id":"10","location":{"column":1,"line":1},"name":"@tag_feature"}]},"uri":"testdata/good/rule_with_tag.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_with_tag.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"12","language":"en","name":"Scenario with only a feature tag","steps":[{"astNodeIds":["0"],"id":"11","text":"a"}],"tags":[{"astNodeId":"10","name":"@tag_feature"}],"uri":"testdata/good/rule_with_tag.feature"}} 2 | {"pickle":{"astNodeIds":["4"],"id":"14","language":"en","name":"Scenario with feature and rule tags","steps":[{"astNodeIds":["3"],"id":"13","text":"b"}],"tags":[{"astNodeId":"10","name":"@tag_feature"},{"astNodeId":"8","name":"@tag_rule"}],"uri":"testdata/good/rule_with_tag.feature"}} 3 | {"pickle":{"astNodeIds":["7"],"id":"16","language":"en","name":"Scenario with feature, rule and scenario tags","steps":[{"astNodeIds":["5"],"id":"15","text":"b"}],"tags":[{"astNodeId":"10","name":"@tag_feature"},{"astNodeId":"8","name":"@tag_rule"},{"astNodeId":"6","name":"@tag_scenario"}],"uri":"testdata/good/rule_with_tag.feature"}} 4 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_with_tag.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"@tag_feature\nFeature: Some tagged rules\n\n Rule: Untagged rule\n The untagged rule description\n\n Scenario: Scenario with only a feature tag\n Given a\n\n @tag_rule\n Rule: Tagged rule\n The tagged rule description\n\n Scenario: Scenario with feature and rule tags\n Given b\n\n @tag_scenario\n Scenario: Scenario with feature, rule and scenario tags\n Given b\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/rule_with_tag.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_with_tag.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)TagLine://1:@tag_feature 2 | (2:1)FeatureLine:Feature/Some tagged rules/ 3 | (3:1)Empty:// 4 | (4:3)RuleLine:Rule/Untagged rule/ 5 | (5:1)Other:/ The untagged rule description/ 6 | (6:1)Other:// 7 | (7:5)ScenarioLine:Scenario/Scenario with only a feature tag/ 8 | (8:7)StepLine:Given /a/ 9 | (9:1)Empty:// 10 | (10:3)TagLine://3:@tag_rule 11 | (11:3)RuleLine:Rule/Tagged rule/ 12 | (12:1)Other:/ The tagged rule description/ 13 | (13:1)Other:// 14 | (14:5)ScenarioLine:Scenario/Scenario with feature and rule tags/ 15 | (15:7)StepLine:Given /b/ 16 | (16:1)Empty:// 17 | (17:5)TagLine://5:@tag_scenario 18 | (18:5)ScenarioLine:Scenario/Scenario with feature, rule and scenario tags/ 19 | (19:7)StepLine:Given /b/ 20 | EOF 21 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_without_name_and_description.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | 3 | Rule: 4 | Scenario: 5 | Given text 6 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_without_name_and_description.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":3,"line":4},"name":"","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":5},"text":"text"}],"tags":[]}}],"description":"","id":"2","keyword":"Rule","location":{"column":3,"line":3},"name":"","tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"","tags":[]},"uri":"testdata/good/rule_without_name_and_description.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_without_name_and_description.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["1"],"id":"4","language":"en","name":"","steps":[{"astNodeIds":["0"],"id":"3","text":"text"}],"tags":[],"uri":"testdata/good/rule_without_name_and_description.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_without_name_and_description.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature:\n\n Rule:\n Scenario:\n Given text\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/rule_without_name_and_description.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/rule_without_name_and_description.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature// 2 | (2:1)Empty:// 3 | (3:3)RuleLine:Rule// 4 | (4:3)ScenarioLine:Scenario// 5 | (5:5)StepLine:Given /text/ 6 | EOF 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline.feature: -------------------------------------------------------------------------------- 1 | Feature: Minimal Scenario Outline 2 | 3 | Scenario: minimalistic 4 | Given the 5 | 6 | Examples: 7 | | what | 8 | | minimalism | 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"3","keyword":"Examples","location":{"column":5,"line":6},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":8},"value":"minimalism"}],"id":"2","location":{"column":7,"line":8}}],"tableHeader":{"cells":[{"location":{"column":9,"line":7},"value":"what"}],"id":"1","location":{"column":7,"line":7}},"tags":[]}],"id":"4","keyword":"Scenario","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the "}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Minimal Scenario Outline","tags":[]},"uri":"testdata/good/scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4","2"],"id":"6","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0","2"],"id":"5","text":"the minimalism"}],"tags":[],"uri":"testdata/good/scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Minimal Scenario Outline\n\n Scenario: minimalistic\n Given the \n\n Examples:\n | what |\n | minimalism |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Minimal Scenario Outline/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario/minimalistic/ 4 | (4:5)StepLine:Given /the / 5 | (5:1)Empty:// 6 | (6:5)ExamplesLine:Examples// 7 | (7:7)TableRow://9:what 8 | (8:7)TableRow://9:minimalism 9 | EOF 10 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_no_newline.feature: -------------------------------------------------------------------------------- 1 | Feature: Minimal Scenario Outline 2 | 3 | Scenario Outline: minimalistic 4 | Given the 5 | 6 | Examples: 7 | | what | 8 | | minimalism | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_no_newline.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"3","keyword":"Examples","location":{"column":1,"line":6},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":8},"value":"minimalism"}],"id":"2","location":{"column":3,"line":8}}],"tableHeader":{"cells":[{"location":{"column":5,"line":7},"value":"what"}],"id":"1","location":{"column":3,"line":7}},"tags":[]}],"id":"4","keyword":"Scenario Outline","location":{"column":1,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the "}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Minimal Scenario Outline","tags":[]},"uri":"testdata/good/scenario_outline_no_newline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_no_newline.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4","2"],"id":"6","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0","2"],"id":"5","text":"the minimalism"}],"tags":[],"uri":"testdata/good/scenario_outline_no_newline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_no_newline.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Minimal Scenario Outline\n\nScenario Outline: minimalistic\n Given the \n\nExamples:\n | what |\n | minimalism |","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/scenario_outline_no_newline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_no_newline.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Minimal Scenario Outline/ 2 | (2:1)Empty:// 3 | (3:1)ScenarioLine:Scenario Outline/minimalistic/ 4 | (4:5)StepLine:Given /the / 5 | (5:1)Empty:// 6 | (6:1)ExamplesLine:Examples// 7 | (7:3)TableRow://5:what 8 | (8:3)TableRow://5:minimalism 9 | EOF 10 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_docstring.feature: -------------------------------------------------------------------------------- 1 | Feature: Scenario Outline with a docstring 2 | 3 | Scenario Outline: Greetings come in many forms 4 | Given this file: 5 | """ 6 | Greeting: 7 | """ 8 | 9 | Examples: 10 | | type | content | 11 | | en | Hello | 12 | | fr | Bonjour | 13 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_docstring.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"4","keyword":"Examples","location":{"column":1,"line":9},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":11},"value":"en"},{"location":{"column":13,"line":11},"value":"Hello"}],"id":"2","location":{"column":3,"line":11}},{"cells":[{"location":{"column":5,"line":12},"value":"fr"},{"location":{"column":13,"line":12},"value":"Bonjour"}],"id":"3","location":{"column":3,"line":12}}],"tableHeader":{"cells":[{"location":{"column":5,"line":10},"value":"type"},{"location":{"column":13,"line":10},"value":"content"}],"id":"1","location":{"column":3,"line":10}},"tags":[]}],"id":"5","keyword":"Scenario Outline","location":{"column":1,"line":3},"name":"Greetings come in many forms","steps":[{"docString":{"content":"Greeting:","delimiter":"\"\"\"","location":{"column":5,"line":5},"mediaType":""},"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"this file:"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Scenario Outline with a docstring","tags":[]},"uri":"testdata/good/scenario_outline_with_docstring.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_docstring.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["5","2"],"id":"7","language":"en","name":"Greetings come in many forms","steps":[{"argument":{"docString":{"content":"Greeting:Hello","mediaType":"en"}},"astNodeIds":["0","2"],"id":"6","text":"this file:"}],"tags":[],"uri":"testdata/good/scenario_outline_with_docstring.feature"}} 2 | {"pickle":{"astNodeIds":["5","3"],"id":"9","language":"en","name":"Greetings come in many forms","steps":[{"argument":{"docString":{"content":"Greeting:Bonjour","mediaType":"fr"}},"astNodeIds":["0","3"],"id":"8","text":"this file:"}],"tags":[],"uri":"testdata/good/scenario_outline_with_docstring.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_docstring.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Scenario Outline with a docstring\n\nScenario Outline: Greetings come in many forms\n Given this file:\n \"\"\"\n Greeting:\n \"\"\"\n\nExamples:\n | type | content |\n | en | Hello |\n | fr | Bonjour |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/scenario_outline_with_docstring.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_docstring.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Scenario Outline with a docstring/ 2 | (2:1)Empty:// 3 | (3:1)ScenarioLine:Scenario Outline/Greetings come in many forms/ 4 | (4:5)StepLine:Given /this file:/ 5 | (5:5)DocStringSeparator:"""// 6 | (6:1)Other:/Greeting:/ 7 | (7:5)DocStringSeparator:"""// 8 | (8:1)Empty:// 9 | (9:1)ExamplesLine:Examples// 10 | (10:3)TableRow://5:type,13:content 11 | (11:3)TableRow://5:en,13:Hello 12 | (12:3)TableRow://5:fr,13:Bonjour 13 | EOF 14 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_value_with_dollar_sign.feature: -------------------------------------------------------------------------------- 1 | Feature: Scenario Outline with a value with a dollar sign ($) 2 | 3 | Scenario Outline: minimalistic 4 | Given the 5 | 6 | Examples: 7 | | what | 8 | | pa$$word | 9 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_value_with_dollar_sign.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"3","keyword":"Examples","location":{"column":1,"line":6},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":8},"value":"pa$$word"}],"id":"2","location":{"column":3,"line":8}}],"tableHeader":{"cells":[{"location":{"column":5,"line":7},"value":"what"}],"id":"1","location":{"column":3,"line":7}},"tags":[]}],"id":"4","keyword":"Scenario Outline","location":{"column":1,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the "}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Scenario Outline with a value with a dollar sign ($)","tags":[]},"uri":"testdata/good/scenario_outline_with_value_with_dollar_sign.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_value_with_dollar_sign.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4","2"],"id":"6","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0","2"],"id":"5","text":"the pa$$word"}],"tags":[],"uri":"testdata/good/scenario_outline_with_value_with_dollar_sign.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_value_with_dollar_sign.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Scenario Outline with a value with a dollar sign ($)\n\nScenario Outline: minimalistic\n Given the \n\nExamples:\n | what |\n | pa$$word |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/scenario_outline_with_value_with_dollar_sign.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outline_with_value_with_dollar_sign.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Scenario Outline with a value with a dollar sign ($)/ 2 | (2:1)Empty:// 3 | (3:1)ScenarioLine:Scenario Outline/minimalistic/ 4 | (4:5)StepLine:Given /the / 5 | (5:1)Empty:// 6 | (6:1)ExamplesLine:Examples// 7 | (7:3)TableRow://5:what 8 | (8:3)TableRow://5:pa$$word 9 | EOF 10 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outlines_with_tags.feature: -------------------------------------------------------------------------------- 1 | @a 2 | Feature: 3 | @b @c 4 | Scenario Outline: 5 | Given 6 | 7 | Examples: 8 | | x | 9 | | y | 10 | 11 | @d @e 12 | Scenario Outline: 13 | Given 14 | 15 | @f 16 | Examples: 17 | | m | 18 | | n | 19 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outlines_with_tags.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"3","keyword":"Examples","location":{"column":5,"line":7},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":9},"value":"y"}],"id":"2","location":{"column":7,"line":9}}],"tableHeader":{"cells":[{"location":{"column":9,"line":8},"value":"x"}],"id":"1","location":{"column":7,"line":8}},"tags":[]}],"id":"6","keyword":"Scenario Outline","location":{"column":3,"line":4},"name":"","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":5},"text":""}],"tags":[{"id":"4","location":{"column":3,"line":3},"name":"@b"},{"id":"5","location":{"column":6,"line":3},"name":"@c"}]}},{"scenario":{"description":"","examples":[{"description":"","id":"11","keyword":"Examples","location":{"column":5,"line":16},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":18},"value":"n"}],"id":"9","location":{"column":7,"line":18}}],"tableHeader":{"cells":[{"location":{"column":9,"line":17},"value":"m"}],"id":"8","location":{"column":7,"line":17}},"tags":[{"id":"10","location":{"column":5,"line":15},"name":"@f"}]}],"id":"14","keyword":"Scenario Outline","location":{"column":3,"line":12},"name":"","steps":[{"id":"7","keyword":"Given ","location":{"column":5,"line":13},"text":""}],"tags":[{"id":"12","location":{"column":3,"line":11},"name":"@d"},{"id":"13","location":{"column":6,"line":11},"name":"@e"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":2},"name":"","tags":[{"id":"15","location":{"column":1,"line":1},"name":"@a"}]},"uri":"testdata/good/scenario_outlines_with_tags.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outlines_with_tags.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["6","2"],"id":"17","language":"en","name":"","steps":[{"astNodeIds":["0","2"],"id":"16","text":"y"}],"tags":[{"astNodeId":"15","name":"@a"},{"astNodeId":"4","name":"@b"},{"astNodeId":"5","name":"@c"}],"uri":"testdata/good/scenario_outlines_with_tags.feature"}} 2 | {"pickle":{"astNodeIds":["14","9"],"id":"19","language":"en","name":"","steps":[{"astNodeIds":["7","9"],"id":"18","text":"n"}],"tags":[{"astNodeId":"15","name":"@a"},{"astNodeId":"12","name":"@d"},{"astNodeId":"13","name":"@e"},{"astNodeId":"10","name":"@f"}],"uri":"testdata/good/scenario_outlines_with_tags.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outlines_with_tags.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"@a\nFeature:\n @b @c\n Scenario Outline:\n Given \n\n Examples:\n | x |\n | y |\n\n @d @e\n Scenario Outline:\n Given \n\n @f\n Examples:\n | m |\n | n |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/scenario_outlines_with_tags.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/scenario_outlines_with_tags.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)TagLine://1:@a 2 | (2:1)FeatureLine:Feature// 3 | (3:3)TagLine://3:@b,6:@c 4 | (4:3)ScenarioLine:Scenario Outline// 5 | (5:5)StepLine:Given // 6 | (6:1)Empty:// 7 | (7:5)ExamplesLine:Examples// 8 | (8:7)TableRow://9:x 9 | (9:7)TableRow://9:y 10 | (10:1)Empty:// 11 | (11:3)TagLine://3:@d,6:@e 12 | (12:3)ScenarioLine:Scenario Outline// 13 | (13:5)StepLine:Given // 14 | (14:1)Empty:// 15 | (15:5)TagLine://5:@f 16 | (16:5)ExamplesLine:Examples// 17 | (17:7)TableRow://9:m 18 | (18:7)TableRow://9:n 19 | EOF 20 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/several_examples.feature: -------------------------------------------------------------------------------- 1 | Feature: Tagged Examples 2 | 3 | Scenario Outline: minimalistic 4 | Given the 5 | 6 | @foo 7 | Examples: 8 | | what | 9 | | foo | 10 | 11 | @bar 12 | Examples: 13 | | what | 14 | | bar | 15 | 16 | @zap 17 | Scenario: ha ok 18 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/several_examples.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"4","keyword":"Examples","location":{"column":5,"line":7},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":9},"value":"foo"}],"id":"2","location":{"column":7,"line":9}}],"tableHeader":{"cells":[{"location":{"column":9,"line":8},"value":"what"}],"id":"1","location":{"column":7,"line":8}},"tags":[{"id":"3","location":{"column":5,"line":6},"name":"@foo"}]},{"description":"","id":"8","keyword":"Examples","location":{"column":5,"line":12},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":14},"value":"bar"}],"id":"6","location":{"column":7,"line":14}}],"tableHeader":{"cells":[{"location":{"column":9,"line":13},"value":"what"}],"id":"5","location":{"column":7,"line":13}},"tags":[{"id":"7","location":{"column":5,"line":11},"name":"@bar"}]}],"id":"9","keyword":"Scenario Outline","location":{"column":3,"line":3},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":4},"text":"the "}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"11","keyword":"Scenario","location":{"column":3,"line":17},"name":"ha ok","steps":[],"tags":[{"id":"10","location":{"column":3,"line":16},"name":"@zap"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Tagged Examples","tags":[]},"uri":"testdata/good/several_examples.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/several_examples.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["9","2"],"id":"13","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0","2"],"id":"12","text":"the foo"}],"tags":[{"astNodeId":"3","name":"@foo"}],"uri":"testdata/good/several_examples.feature"}} 2 | {"pickle":{"astNodeIds":["9","6"],"id":"15","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0","6"],"id":"14","text":"the bar"}],"tags":[{"astNodeId":"7","name":"@bar"}],"uri":"testdata/good/several_examples.feature"}} 3 | {"pickle":{"astNodeIds":["11"],"id":"16","language":"en","name":"ha ok","steps":[],"tags":[{"astNodeId":"10","name":"@zap"}],"uri":"testdata/good/several_examples.feature"}} 4 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/several_examples.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"Feature: Tagged Examples\n\n Scenario Outline: minimalistic\n Given the \n\n @foo\n Examples:\n | what |\n | foo |\n\n @bar\n Examples:\n | what |\n | bar |\n\n @zap\n Scenario: ha ok\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/several_examples.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/several_examples.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)FeatureLine:Feature/Tagged Examples/ 2 | (2:1)Empty:// 3 | (3:3)ScenarioLine:Scenario Outline/minimalistic/ 4 | (4:5)StepLine:Given /the / 5 | (5:1)Empty:// 6 | (6:5)TagLine://5:@foo 7 | (7:5)ExamplesLine:Examples// 8 | (8:7)TableRow://9:what 9 | (9:7)TableRow://9:foo 10 | (10:1)Empty:// 11 | (11:5)TagLine://5:@bar 12 | (12:5)ExamplesLine:Examples// 13 | (13:7)TableRow://9:what 14 | (14:7)TableRow://9:bar 15 | (15:1)Empty:// 16 | (16:3)TagLine://3:@zap 17 | (17:3)ScenarioLine:Scenario/ha ok/ 18 | EOF 19 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/spaces_in_language.feature: -------------------------------------------------------------------------------- 1 | # language : en-lol 2 | OH HAI: STUFFING 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/spaces_in_language.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[],"description":"","keyword":"OH HAI","language":"en-lol","location":{"column":1,"line":2},"name":"STUFFING","tags":[]},"uri":"testdata/good/spaces_in_language.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/spaces_in_language.feature.pickles.ndjson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cucumber-rs/gherkin/fd6fcd335e01907d93903a83fd331dd529e5b3b2/tests/fixtures/data/good/spaces_in_language.feature.pickles.ndjson -------------------------------------------------------------------------------- /tests/fixtures/data/good/spaces_in_language.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":" # language : en-lol\nOH HAI: STUFFING\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/spaces_in_language.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/spaces_in_language.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:3)Language:/en-lol/ 2 | (2:1)FeatureLine:OH HAI/STUFFING/ 3 | EOF 4 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tagged_feature_with_scenario_outline.feature: -------------------------------------------------------------------------------- 1 | @sometag 2 | Feature: Foo 3 | 4 | Scenario Outline: Bar 5 | Then Baz 6 | 7 | Examples: 8 | | name | 9 | | X | 10 | | Y | 11 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tagged_feature_with_scenario_outline.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"4","keyword":"Examples","location":{"column":5,"line":7},"name":"","tableBody":[{"cells":[{"location":{"column":7,"line":9},"value":"X"}],"id":"2","location":{"column":5,"line":9}},{"cells":[{"location":{"column":7,"line":10},"value":"Y"}],"id":"3","location":{"column":5,"line":10}}],"tableHeader":{"cells":[{"location":{"column":7,"line":8},"value":"name"}],"id":"1","location":{"column":5,"line":8}},"tags":[]}],"id":"5","keyword":"Scenario Outline","location":{"column":3,"line":4},"name":"Bar","steps":[{"id":"0","keyword":"Then ","location":{"column":5,"line":5},"text":"Baz"}],"tags":[]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":2},"name":"Foo","tags":[{"id":"6","location":{"column":1,"line":1},"name":"@sometag"}]},"uri":"testdata/good/tagged_feature_with_scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tagged_feature_with_scenario_outline.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["5","2"],"id":"8","language":"en","name":"Bar","steps":[{"astNodeIds":["0","2"],"id":"7","text":"Baz"}],"tags":[{"astNodeId":"6","name":"@sometag"}],"uri":"testdata/good/tagged_feature_with_scenario_outline.feature"}} 2 | {"pickle":{"astNodeIds":["5","3"],"id":"10","language":"en","name":"Bar","steps":[{"astNodeIds":["0","3"],"id":"9","text":"Baz"}],"tags":[{"astNodeId":"6","name":"@sometag"}],"uri":"testdata/good/tagged_feature_with_scenario_outline.feature"}} 3 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tagged_feature_with_scenario_outline.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"@sometag\nFeature: Foo\n\n Scenario Outline: Bar\n Then Baz\n\n Examples:\n | name |\n | X |\n | Y |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/tagged_feature_with_scenario_outline.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tagged_feature_with_scenario_outline.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)TagLine://1:@sometag 2 | (2:1)FeatureLine:Feature/Foo/ 3 | (3:1)Empty:// 4 | (4:3)ScenarioLine:Scenario Outline/Bar/ 5 | (5:5)StepLine:Then /Baz/ 6 | (6:1)Empty:// 7 | (7:5)ExamplesLine:Examples// 8 | (8:5)TableRow://7:name 9 | (9:5)TableRow://7:X 10 | (10:5)TableRow://7:Y 11 | EOF 12 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature: -------------------------------------------------------------------------------- 1 | @feature_tag1 @feature_tag2 2 | @feature_tag3 3 | Feature: Minimal Scenario Outline 4 | 5 | @scenario_tag1 @scenario_tag2 6 | @scenario_tag3 7 | Scenario: minimalistic 8 | Given the minimalism 9 | 10 | @so_tag1 @so_tag2 11 | @so_tag3 12 | Scenario Outline: minimalistic outline 13 | Given the 14 | 15 | @ex_tag1 @ex_tag2 16 | @ex_tag3 17 | Examples: 18 | | what | 19 | | minimalism | 20 | 21 | @ex_tag4 @ex_tag5 22 | @ex_tag6 23 | Examples: 24 | | what | 25 | | more minimalism | 26 | 27 | @comment_tag1 #a comment 28 | Scenario: comments 29 | Given a comment 30 | 31 | @comment_tag#2 #a comment 32 | Scenario: hash in tags 33 | Given a comment is preceded by a space 34 | 35 | @rule_tag 36 | Rule: 37 | 38 | @joined_tag3@joined_tag4 39 | Scenario: joined tags 40 | Given the @delimits tags 41 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"4","keyword":"Scenario","location":{"column":1,"line":7},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":5,"line":8},"text":"the minimalism"}],"tags":[{"id":"1","location":{"column":1,"line":5},"name":"@scenario_tag1"},{"id":"2","location":{"column":16,"line":5},"name":"@scenario_tag2"},{"id":"3","location":{"column":3,"line":6},"name":"@scenario_tag3"}]}},{"scenario":{"description":"","examples":[{"description":"","id":"11","keyword":"Examples","location":{"column":1,"line":17},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":19},"value":"minimalism"}],"id":"7","location":{"column":3,"line":19}}],"tableHeader":{"cells":[{"location":{"column":5,"line":18},"value":"what"}],"id":"6","location":{"column":3,"line":18}},"tags":[{"id":"8","location":{"column":1,"line":15},"name":"@ex_tag1"},{"id":"9","location":{"column":10,"line":15},"name":"@ex_tag2"},{"id":"10","location":{"column":3,"line":16},"name":"@ex_tag3"}]},{"description":"","id":"17","keyword":"Examples","location":{"column":1,"line":23},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":25},"value":"more minimalism"}],"id":"13","location":{"column":3,"line":25}}],"tableHeader":{"cells":[{"location":{"column":5,"line":24},"value":"what"}],"id":"12","location":{"column":3,"line":24}},"tags":[{"id":"14","location":{"column":1,"line":21},"name":"@ex_tag4"},{"id":"15","location":{"column":10,"line":21},"name":"@ex_tag5"},{"id":"16","location":{"column":3,"line":22},"name":"@ex_tag6"}]}],"id":"21","keyword":"Scenario Outline","location":{"column":1,"line":12},"name":"minimalistic outline","steps":[{"id":"5","keyword":"Given ","location":{"column":5,"line":13},"text":"the "}],"tags":[{"id":"18","location":{"column":1,"line":10},"name":"@so_tag1"},{"id":"19","location":{"column":11,"line":10},"name":"@so_tag2"},{"id":"20","location":{"column":3,"line":11},"name":"@so_tag3"}]}},{"scenario":{"description":"","examples":[],"id":"24","keyword":"Scenario","location":{"column":1,"line":28},"name":"comments","steps":[{"id":"22","keyword":"Given ","location":{"column":3,"line":29},"text":"a comment"}],"tags":[{"id":"23","location":{"column":1,"line":27},"name":"@comment_tag1"}]}},{"scenario":{"description":"","examples":[],"id":"27","keyword":"Scenario","location":{"column":1,"line":32},"name":"hash in tags","steps":[{"id":"25","keyword":"Given ","location":{"column":3,"line":33},"text":"a comment is preceded by a space"}],"tags":[{"id":"26","location":{"column":1,"line":31},"name":"@comment_tag#2"}]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"31","keyword":"Scenario","location":{"column":1,"line":39},"name":"joined tags","steps":[{"id":"28","keyword":"Given ","location":{"column":3,"line":40},"text":"the @delimits tags"}],"tags":[{"id":"29","location":{"column":1,"line":38},"name":"@joined_tag3"},{"id":"30","location":{"column":13,"line":38},"name":"@joined_tag4"}]}}],"description":"","id":"33","keyword":"Rule","location":{"column":1,"line":36},"name":"","tags":[{"id":"32","location":{"column":1,"line":35},"name":"@rule_tag"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":1,"line":3},"name":"Minimal Scenario Outline","tags":[{"id":"34","location":{"column":1,"line":1},"name":"@feature_tag1"},{"id":"35","location":{"column":15,"line":1},"name":"@feature_tag2"},{"id":"36","location":{"column":3,"line":2},"name":"@feature_tag3"}]},"uri":"testdata/good/tags.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.md: -------------------------------------------------------------------------------- 1 | `@feature_tag1` `@feature_tag2` 2 | `@feature_tag3` 3 | # Feature: Minimal Scenario Outline 4 | 5 | `@scenario_tag1` `@scenario_tag2` 6 | `@scenario_tag3` 7 | ## Scenario: minimalistic 8 | * Given the minimalism 9 | 10 | `@so_tag1` `@so_tag2` 11 | `@so_tag3` 12 | ## Scenario Outline: minimalistic outline 13 | * Given the 14 | 15 | `@ex_tag1` `@ex_tag2` 16 | `@ex_tag3` 17 | ### Examples: 18 | | what | 19 | | ---------- | 20 | | minimalism | 21 | 22 | `@ex_tag4` `@ex_tag5` 23 | `@ex_tag6` 24 | ### Examples: 25 | | what | 26 | | ---------- | 27 | | more minimalism | 28 | 29 | `@comment_tag1` #a comment 30 | ## Scenario: comments 31 | Given a comment 32 | 33 | `@comment_tag#2` #a comment 34 | ## Scenario: hash in tags 35 | Given a comment is preceded by a space 36 | 37 | `@rule_tag` 38 | ## Rule: 39 | 40 | `@joined_tag3``@joined_tag4` 41 | ### Scenario: joined tags 42 | Given the @delimits tags 43 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.md.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"4","keyword":"Scenario","location":{"column":4,"line":7},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":3,"line":8},"text":"the minimalism"}],"tags":[{"id":"1","location":{"column":2,"line":5},"name":"@scenario_tag1"},{"id":"2","location":{"column":19,"line":5},"name":"@scenario_tag2"},{"id":"3","location":{"column":4,"line":6},"name":"@scenario_tag3"}]}},{"scenario":{"description":"","examples":[{"description":"","id":"11","keyword":"Examples","location":{"column":5,"line":17},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":20},"value":"minimalism"}],"id":"7","location":{"column":3,"line":20}}],"tableHeader":{"cells":[{"location":{"column":5,"line":18},"value":"what"}],"id":"6","location":{"column":3,"line":18}},"tags":[{"id":"8","location":{"column":2,"line":15},"name":"@ex_tag1"},{"id":"9","location":{"column":13,"line":15},"name":"@ex_tag2"},{"id":"10","location":{"column":4,"line":16},"name":"@ex_tag3"}]},{"description":"","id":"17","keyword":"Examples","location":{"column":5,"line":24},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":27},"value":"more minimalism"}],"id":"13","location":{"column":3,"line":27}}],"tableHeader":{"cells":[{"location":{"column":5,"line":25},"value":"what"}],"id":"12","location":{"column":3,"line":25}},"tags":[{"id":"14","location":{"column":2,"line":22},"name":"@ex_tag4"},{"id":"15","location":{"column":13,"line":22},"name":"@ex_tag5"},{"id":"16","location":{"column":4,"line":23},"name":"@ex_tag6"}]}],"id":"21","keyword":"Scenario Outline","location":{"column":4,"line":12},"name":"minimalistic outline","steps":[{"id":"5","keyword":"Given ","location":{"column":3,"line":13},"text":"the "}],"tags":[{"id":"18","location":{"column":2,"line":10},"name":"@so_tag1"},{"id":"19","location":{"column":14,"line":10},"name":"@so_tag2"},{"id":"20","location":{"column":4,"line":11},"name":"@so_tag3"}]}},{"scenario":{"description":"","examples":[],"id":"23","keyword":"Scenario","location":{"column":4,"line":30},"name":"comments","steps":[],"tags":[{"id":"22","location":{"column":2,"line":29},"name":"@comment_tag1"}]}},{"scenario":{"description":"","examples":[],"id":"25","keyword":"Scenario","location":{"column":4,"line":34},"name":"hash in tags","steps":[],"tags":[{"id":"24","location":{"column":2,"line":33},"name":"@comment_tag#2"}]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"28","keyword":"Scenario","location":{"column":5,"line":41},"name":"joined tags","steps":[],"tags":[{"id":"26","location":{"column":2,"line":40},"name":"@joined_tag3"},{"id":"27","location":{"column":16,"line":40},"name":"@joined_tag4"}]}}],"description":"","id":"30","keyword":"Rule","location":{"column":4,"line":38},"name":"","tags":[{"id":"29","location":{"column":2,"line":37},"name":"@rule_tag"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":3,"line":3},"name":"Minimal Scenario Outline","tags":[{"id":"31","location":{"column":2,"line":1},"name":"@feature_tag1"},{"id":"32","location":{"column":18,"line":1},"name":"@feature_tag2"},{"id":"33","location":{"column":4,"line":2},"name":"@feature_tag3"}]},"uri":"testdata/good/tags.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.md.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4"],"id":"35","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"34","text":"the minimalism"}],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"1","name":"@scenario_tag1"},{"astNodeId":"2","name":"@scenario_tag2"},{"astNodeId":"3","name":"@scenario_tag3"}],"uri":"testdata/good/tags.feature.md"}} 2 | {"pickle":{"astNodeIds":["21","7"],"id":"37","language":"en","name":"minimalistic outline","steps":[{"astNodeIds":["5","7"],"id":"36","text":"the minimalism"}],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"18","name":"@so_tag1"},{"astNodeId":"19","name":"@so_tag2"},{"astNodeId":"20","name":"@so_tag3"},{"astNodeId":"8","name":"@ex_tag1"},{"astNodeId":"9","name":"@ex_tag2"},{"astNodeId":"10","name":"@ex_tag3"}],"uri":"testdata/good/tags.feature.md"}} 3 | {"pickle":{"astNodeIds":["21","13"],"id":"39","language":"en","name":"minimalistic outline","steps":[{"astNodeIds":["5","13"],"id":"38","text":"the more minimalism"}],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"18","name":"@so_tag1"},{"astNodeId":"19","name":"@so_tag2"},{"astNodeId":"20","name":"@so_tag3"},{"astNodeId":"14","name":"@ex_tag4"},{"astNodeId":"15","name":"@ex_tag5"},{"astNodeId":"16","name":"@ex_tag6"}],"uri":"testdata/good/tags.feature.md"}} 4 | {"pickle":{"astNodeIds":["23"],"id":"40","language":"en","name":"comments","steps":[],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"22","name":"@comment_tag1"}],"uri":"testdata/good/tags.feature.md"}} 5 | {"pickle":{"astNodeIds":["25"],"id":"41","language":"en","name":"hash in tags","steps":[],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"24","name":"@comment_tag#2"}],"uri":"testdata/good/tags.feature.md"}} 6 | {"pickle":{"astNodeIds":["28"],"id":"42","language":"en","name":"joined tags","steps":[],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"29","name":"@rule_tag"},{"astNodeId":"26","name":"@joined_tag3"},{"astNodeId":"27","name":"@joined_tag4"}],"uri":"testdata/good/tags.feature.md"}} 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.md.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"`@feature_tag1` `@feature_tag2`\n `@feature_tag3`\n# Feature: Minimal Scenario Outline\n\n`@scenario_tag1` `@scenario_tag2`\n `@scenario_tag3`\n## Scenario: minimalistic\n* Given the minimalism\n\n`@so_tag1` `@so_tag2` \n `@so_tag3`\n## Scenario Outline: minimalistic outline\n* Given the \n\n`@ex_tag1` `@ex_tag2`\n `@ex_tag3`\n### Examples:\n | what |\n | ---------- |\n | minimalism |\n\n`@ex_tag4` `@ex_tag5`\n `@ex_tag6`\n### Examples:\n | what |\n | ---------- |\n | more minimalism |\n\n`@comment_tag1` #a comment\n## Scenario: comments\n Given a comment\n\n`@comment_tag#2` #a comment\n## Scenario: hash in tags\n Given a comment is preceded by a space\n\n`@rule_tag`\n## Rule:\n\n`@joined_tag3``@joined_tag4`\n### Scenario: joined tags\n Given the @delimits tags\n","mediaType":"text/x.cucumber.gherkin+markdown","uri":"testdata/good/tags.feature.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4"],"id":"38","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"37","text":"the minimalism"}],"tags":[{"astNodeId":"34","name":"@feature_tag1"},{"astNodeId":"35","name":"@feature_tag2"},{"astNodeId":"36","name":"@feature_tag3"},{"astNodeId":"1","name":"@scenario_tag1"},{"astNodeId":"2","name":"@scenario_tag2"},{"astNodeId":"3","name":"@scenario_tag3"}],"uri":"testdata/good/tags.feature"}} 2 | {"pickle":{"astNodeIds":["21","7"],"id":"40","language":"en","name":"minimalistic outline","steps":[{"astNodeIds":["5","7"],"id":"39","text":"the minimalism"}],"tags":[{"astNodeId":"34","name":"@feature_tag1"},{"astNodeId":"35","name":"@feature_tag2"},{"astNodeId":"36","name":"@feature_tag3"},{"astNodeId":"18","name":"@so_tag1"},{"astNodeId":"19","name":"@so_tag2"},{"astNodeId":"20","name":"@so_tag3"},{"astNodeId":"8","name":"@ex_tag1"},{"astNodeId":"9","name":"@ex_tag2"},{"astNodeId":"10","name":"@ex_tag3"}],"uri":"testdata/good/tags.feature"}} 3 | {"pickle":{"astNodeIds":["21","13"],"id":"42","language":"en","name":"minimalistic outline","steps":[{"astNodeIds":["5","13"],"id":"41","text":"the more minimalism"}],"tags":[{"astNodeId":"34","name":"@feature_tag1"},{"astNodeId":"35","name":"@feature_tag2"},{"astNodeId":"36","name":"@feature_tag3"},{"astNodeId":"18","name":"@so_tag1"},{"astNodeId":"19","name":"@so_tag2"},{"astNodeId":"20","name":"@so_tag3"},{"astNodeId":"14","name":"@ex_tag4"},{"astNodeId":"15","name":"@ex_tag5"},{"astNodeId":"16","name":"@ex_tag6"}],"uri":"testdata/good/tags.feature"}} 4 | {"pickle":{"astNodeIds":["24"],"id":"44","language":"en","name":"comments","steps":[{"astNodeIds":["22"],"id":"43","text":"a comment"}],"tags":[{"astNodeId":"34","name":"@feature_tag1"},{"astNodeId":"35","name":"@feature_tag2"},{"astNodeId":"36","name":"@feature_tag3"},{"astNodeId":"23","name":"@comment_tag1"}],"uri":"testdata/good/tags.feature"}} 5 | {"pickle":{"astNodeIds":["27"],"id":"46","language":"en","name":"hash in tags","steps":[{"astNodeIds":["25"],"id":"45","text":"a comment is preceded by a space"}],"tags":[{"astNodeId":"34","name":"@feature_tag1"},{"astNodeId":"35","name":"@feature_tag2"},{"astNodeId":"36","name":"@feature_tag3"},{"astNodeId":"26","name":"@comment_tag#2"}],"uri":"testdata/good/tags.feature"}} 6 | {"pickle":{"astNodeIds":["31"],"id":"48","language":"en","name":"joined tags","steps":[{"astNodeIds":["28"],"id":"47","text":"the @delimits tags"}],"tags":[{"astNodeId":"34","name":"@feature_tag1"},{"astNodeId":"35","name":"@feature_tag2"},{"astNodeId":"36","name":"@feature_tag3"},{"astNodeId":"32","name":"@rule_tag"},{"astNodeId":"29","name":"@joined_tag3"},{"astNodeId":"30","name":"@joined_tag4"}],"uri":"testdata/good/tags.feature"}} 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"@feature_tag1 @feature_tag2\n @feature_tag3\nFeature: Minimal Scenario Outline\n\n@scenario_tag1 @scenario_tag2\n @scenario_tag3\nScenario: minimalistic\n Given the minimalism\n\n@so_tag1 @so_tag2 \n @so_tag3\nScenario Outline: minimalistic outline\n Given the \n\n@ex_tag1 @ex_tag2\n @ex_tag3\nExamples: \n | what |\n | minimalism |\n\n@ex_tag4 @ex_tag5\n @ex_tag6\nExamples: \n | what |\n | more minimalism |\n\n@comment_tag1 #a comment\nScenario: comments\n Given a comment\n\n@comment_tag#2 #a comment\nScenario: hash in tags\n Given a comment is preceded by a space\n\n@rule_tag\nRule:\n\n@joined_tag3@joined_tag4\nScenario: joined tags\n Given the @delimits tags\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"testdata/good/tags.feature"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.feature.tokens: -------------------------------------------------------------------------------- 1 | (1:1)TagLine://1:@feature_tag1,15:@feature_tag2 2 | (2:3)TagLine://3:@feature_tag3 3 | (3:1)FeatureLine:Feature/Minimal Scenario Outline/ 4 | (4:1)Empty:// 5 | (5:1)TagLine://1:@scenario_tag1,16:@scenario_tag2 6 | (6:3)TagLine://3:@scenario_tag3 7 | (7:1)ScenarioLine:Scenario/minimalistic/ 8 | (8:5)StepLine:Given /the minimalism/ 9 | (9:1)Empty:// 10 | (10:1)TagLine://1:@so_tag1,11:@so_tag2 11 | (11:3)TagLine://3:@so_tag3 12 | (12:1)ScenarioLine:Scenario Outline/minimalistic outline/ 13 | (13:5)StepLine:Given /the / 14 | (14:1)Empty:// 15 | (15:1)TagLine://1:@ex_tag1,10:@ex_tag2 16 | (16:3)TagLine://3:@ex_tag3 17 | (17:1)ExamplesLine:Examples// 18 | (18:3)TableRow://5:what 19 | (19:3)TableRow://5:minimalism 20 | (20:1)Empty:// 21 | (21:1)TagLine://1:@ex_tag4,10:@ex_tag5 22 | (22:3)TagLine://3:@ex_tag6 23 | (23:1)ExamplesLine:Examples// 24 | (24:3)TableRow://5:what 25 | (25:3)TableRow://5:more minimalism 26 | (26:1)Empty:// 27 | (27:1)TagLine://1:@comment_tag1 28 | (28:1)ScenarioLine:Scenario/comments/ 29 | (29:3)StepLine:Given /a comment/ 30 | (30:1)Empty:// 31 | (31:1)TagLine://1:@comment_tag#2 32 | (32:1)ScenarioLine:Scenario/hash in tags/ 33 | (33:3)StepLine:Given /a comment is preceded by a space/ 34 | (34:1)Empty:// 35 | (35:1)TagLine://1:@rule_tag 36 | (36:1)RuleLine:Rule// 37 | (37:1)Empty:// 38 | (38:1)TagLine://1:@joined_tag3,13:@joined_tag4 39 | (39:1)ScenarioLine:Scenario/joined tags/ 40 | (40:3)StepLine:Given /the @delimits tags/ 41 | EOF 42 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.md.ast.ndjson: -------------------------------------------------------------------------------- 1 | {"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"4","keyword":"Scenario","location":{"column":4,"line":7},"name":"minimalistic","steps":[{"id":"0","keyword":"Given ","location":{"column":3,"line":8},"text":"the minimalism"}],"tags":[{"id":"1","location":{"column":2,"line":5},"name":"@scenario_tag1"},{"id":"2","location":{"column":19,"line":5},"name":"@scenario_tag2"},{"id":"3","location":{"column":4,"line":6},"name":"@scenario_tag3"}]}},{"scenario":{"description":"","examples":[{"description":"","id":"11","keyword":"Examples","location":{"column":5,"line":17},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":20},"value":"minimalism"}],"id":"7","location":{"column":3,"line":20}}],"tableHeader":{"cells":[{"location":{"column":5,"line":18},"value":"what"}],"id":"6","location":{"column":3,"line":18}},"tags":[{"id":"8","location":{"column":2,"line":15},"name":"@ex_tag1"},{"id":"9","location":{"column":13,"line":15},"name":"@ex_tag2"},{"id":"10","location":{"column":4,"line":16},"name":"@ex_tag3"}]},{"description":"","id":"17","keyword":"Examples","location":{"column":5,"line":24},"name":"","tableBody":[{"cells":[{"location":{"column":5,"line":27},"value":"more minimalism"}],"id":"13","location":{"column":3,"line":27}}],"tableHeader":{"cells":[{"location":{"column":5,"line":25},"value":"what"}],"id":"12","location":{"column":3,"line":25}},"tags":[{"id":"14","location":{"column":2,"line":22},"name":"@ex_tag4"},{"id":"15","location":{"column":13,"line":22},"name":"@ex_tag5"},{"id":"16","location":{"column":4,"line":23},"name":"@ex_tag6"}]}],"id":"21","keyword":"Scenario Outline","location":{"column":4,"line":12},"name":"minimalistic outline","steps":[{"id":"5","keyword":"Given ","location":{"column":3,"line":13},"text":"the "}],"tags":[{"id":"18","location":{"column":2,"line":10},"name":"@so_tag1"},{"id":"19","location":{"column":14,"line":10},"name":"@so_tag2"},{"id":"20","location":{"column":4,"line":11},"name":"@so_tag3"}]}},{"scenario":{"description":"","examples":[],"id":"23","keyword":"Scenario","location":{"column":4,"line":30},"name":"comments","steps":[],"tags":[{"id":"22","location":{"column":2,"line":29},"name":"@comment_tag1"}]}},{"scenario":{"description":"","examples":[],"id":"25","keyword":"Scenario","location":{"column":4,"line":34},"name":"hash in tags","steps":[],"tags":[{"id":"24","location":{"column":2,"line":33},"name":"@comment_tag#2"}]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"28","keyword":"Scenario","location":{"column":5,"line":41},"name":"joined tags","steps":[],"tags":[{"id":"26","location":{"column":2,"line":40},"name":"@joined_tag3"},{"id":"27","location":{"column":16,"line":40},"name":"@joined_tag4"}]}}],"description":"","id":"30","keyword":"Rule","location":{"column":4,"line":38},"name":"","tags":[{"id":"29","location":{"column":2,"line":37},"name":"@rule_tag"}]}}],"description":"","keyword":"Feature","language":"en","location":{"column":3,"line":3},"name":"Minimal Scenario Outline","tags":[{"id":"31","location":{"column":2,"line":1},"name":"@feature_tag1"},{"id":"32","location":{"column":18,"line":1},"name":"@feature_tag2"},{"id":"33","location":{"column":4,"line":2},"name":"@feature_tag3"}]},"uri":"testdata/good/tags.md"}} 2 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.md.pickles.ndjson: -------------------------------------------------------------------------------- 1 | {"pickle":{"astNodeIds":["4"],"id":"35","language":"en","name":"minimalistic","steps":[{"astNodeIds":["0"],"id":"34","text":"the minimalism"}],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"1","name":"@scenario_tag1"},{"astNodeId":"2","name":"@scenario_tag2"},{"astNodeId":"3","name":"@scenario_tag3"}],"uri":"testdata/good/tags.md"}} 2 | {"pickle":{"astNodeIds":["21","7"],"id":"37","language":"en","name":"minimalistic outline","steps":[{"astNodeIds":["5","7"],"id":"36","text":"the minimalism"}],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"18","name":"@so_tag1"},{"astNodeId":"19","name":"@so_tag2"},{"astNodeId":"20","name":"@so_tag3"},{"astNodeId":"8","name":"@ex_tag1"},{"astNodeId":"9","name":"@ex_tag2"},{"astNodeId":"10","name":"@ex_tag3"}],"uri":"testdata/good/tags.md"}} 3 | {"pickle":{"astNodeIds":["21","13"],"id":"39","language":"en","name":"minimalistic outline","steps":[{"astNodeIds":["5","13"],"id":"38","text":"the more minimalism"}],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"18","name":"@so_tag1"},{"astNodeId":"19","name":"@so_tag2"},{"astNodeId":"20","name":"@so_tag3"},{"astNodeId":"14","name":"@ex_tag4"},{"astNodeId":"15","name":"@ex_tag5"},{"astNodeId":"16","name":"@ex_tag6"}],"uri":"testdata/good/tags.md"}} 4 | {"pickle":{"astNodeIds":["23"],"id":"40","language":"en","name":"comments","steps":[],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"22","name":"@comment_tag1"}],"uri":"testdata/good/tags.md"}} 5 | {"pickle":{"astNodeIds":["25"],"id":"41","language":"en","name":"hash in tags","steps":[],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"24","name":"@comment_tag#2"}],"uri":"testdata/good/tags.md"}} 6 | {"pickle":{"astNodeIds":["28"],"id":"42","language":"en","name":"joined tags","steps":[],"tags":[{"astNodeId":"31","name":"@feature_tag1"},{"astNodeId":"32","name":"@feature_tag2"},{"astNodeId":"33","name":"@feature_tag3"},{"astNodeId":"29","name":"@rule_tag"},{"astNodeId":"26","name":"@joined_tag3"},{"astNodeId":"27","name":"@joined_tag4"}],"uri":"testdata/good/tags.md"}} 7 | -------------------------------------------------------------------------------- /tests/fixtures/data/good/tags.md.source.ndjson: -------------------------------------------------------------------------------- 1 | {"source":{"data":"`@feature_tag1` `@feature_tag2`\n `@feature_tag3`\n# Feature: Minimal Scenario Outline\n\n`@scenario_tag1` `@scenario_tag2`\n `@scenario_tag3`\n## Scenario: minimalistic\n* Given the minimalism\n\n`@so_tag1` `@so_tag2` \n `@so_tag3`\n## Scenario Outline: minimalistic outline\n* Given the \n\n`@ex_tag1` `@ex_tag2`\n `@ex_tag3`\n### Examples:\n | what |\n | ---------- |\n | minimalism |\n\n`@ex_tag4` `@ex_tag5`\n `@ex_tag6`\n### Examples:\n | what |\n | ---------- |\n | more minimalism |\n\n`@comment_tag1` #a comment\n## Scenario: comments\n Given a comment\n\n`@comment_tag#2` #a comment\n## Scenario: hash in tags\n Given a comment is preceded by a space\n\n`@rule_tag`\n## Rule:\n\n`@joined_tag3``@joined_tag4`\n### Scenario: joined tags\n Given the @delimits tags\n","mediaType":"text/x.cucumber.gherkin+markdown","uri":"testdata/good/tags.md"}} 2 | -------------------------------------------------------------------------------- /tests/test.feature: -------------------------------------------------------------------------------- 1 | 2 | @feature-tag 3 | Feature: This is a feature file 4 | 5 | For all queries, parameters will not be set for default values as defined by: 6 | * Numeric inputs: 0 7 | * String inputs: "" 8 | But list isn't exhaustive 9 | 10 | 11 | # Surprise comment 12 | Background: 13 | Given I am doing a test 14 | When I test 15 | Then I succeed 16 | """ 17 | I can have docstrings 18 | """ 19 | And a thing 20 | But another 21 | | first | second | third | 22 | | a thingo | another thingo | final thingo | 23 | | a thingo 2 | another thingo 2 | final thingo 2 | 24 | And then it was fun 25 | | value1 | value2 | 26 | 27 | #comment 28 | @tag1 @tag2 @tag-life_woo @tag.with#more.chars #comment 29 | 30 | 31 | #comment 32 | Scenario: A second scenario test 33 | Given I have not been testing much 34 | Then I should probably start doing it 35 | 36 | 37 | Scenario: I am lightly tabbed 38 | Given I am lightly tabbed 39 | Then handle how tabbed I am 40 | 41 | @taglife@with_joined_tags 42 | Scenario Outline: eating cucumbers 43 | Given there are cucumbers 44 | When I eat cucumbers 45 | Then I should have cucumbers 46 | 47 | @another-misfeature-of-cucumber 48 | Examples: 49 | | start | eat | left | 50 | | 12 | 5 | 7 | 51 | | 20 | 5 | 15 | 52 | 53 | @multiple-examples 54 | Scenario Outline: eating 55 | Given there are cucumbers 56 | When I eat cucumbers 57 | Then I should have cucumbers 58 | 59 | Examples: 60 | | start | eat | left | 61 | | 12 | 5 | 7 | 62 | | 20 | 5 | 15 | 63 | 64 | @another-misfeature-of-cucumber 65 | Examples: 66 | | start | eat | left | 67 | | 12 | 5 | 7 | 68 | | 20 | 5 | 15 | 69 | 70 | @scenario-with-tab-indentation 71 | Scenario: A second scenario test 72 | # Below are TABs don't remove/convert them 73 | Given I have not been testing much 74 | Then I should probably start doing it 75 | # Above are TABs don't remove/convert them 76 | 77 | Scenario: A step with a doc comment and no new line at the end of the doc 78 | Given a 79 | """ 80 | there's no newline following this docstring 81 | """ 82 | --------------------------------------------------------------------------------