Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single quotation marks in data table are not being espaced #222

Closed
youssef-t opened this issue May 4, 2022 · 2 comments
Closed

Single quotation marks in data table are not being espaced #222

youssef-t opened this issue May 4, 2022 · 2 comments

Comments

@youssef-t
Copy link

(package version: flutter_gherkin: ^3.0.0-rc.9)

If there is a single quotation mark in a data table, it will not be escaped and the test file will not generated as a result.

Let's take for example the following feature file:

# language: en
Feature: Check users
    Scenario: Check users descriptions
        Given I am logged in
        When I press "Users"
        Then I expect the following results
            | user   | user_description                                          |
            | John   | I am a college student                                    |
            | Robert | I'm a tester                                              |

When we try generate the test file, we get the following error:

[SEVERE] flutter_gherkin:gherkin_test_suite on integration_test/gherkin_suite_test.dart:
An error `FormatterException` occurred while formatting the generated source for
  `asset:application/integration_test/gherkin_suite_test.dart`
which was output to
  `integration_test/gherkin_suite_test.gherkin_tests.g.part`.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:

line 2614, column 5 of .: Expected to find ')'.
     ?
2614 ¦     },
     ¦     ^
     ?
line 2609, column 143 of .: Unterminated string literal.
     ?
2609 ¦     GherkinTable.fromJson('[{"user":"John","user_description":"I am a college student"},{"user":"Robert","user_description":"I'm a tester"}]'),
     ¦                                                                                                                                               ^
     ?
line 2609, column 138 of .: Expected to find ','.
     ?
2609 ¦     GherkinTable.fromJson('[{"user":"John","user_description":"I am a college student"},{"user":"Robert","user_description":"I'm a tester"}]'),
     ¦                                                                                                                                          ^^^^^^
     ?
line 2610, column 5 of .: Expected to find ','.
     ?
2610 ¦     dependencies,
     ¦     ^^^^^^^^^^^^
     ?
line 2609, column 132 of .: Expected to find ','.
     ?
2609 ¦     GherkinTable.fromJson('[{"user":"John","user_description":"I am a college student"},{"user":"Robert","user_description":"I'm a tester"}]'),
     ¦                                                                                                                                    ^^^^^^
     ?
line 2609, column 130 of .: Expected to find ','.
     ?
2609 ¦     GherkinTable.fromJson('[{"user":"John","user_description":"I am a college student"},{"user":"Robert","user_description":"I'm a tester"}]'),
     ¦                                                                                                                                  ^
     ?
line 2609, column 128 of .: Expected to find ','.
     ?
2609 ¦     GherkinTable.fromJson('[{"user":"John","user_description":"I am a college student"},{"user":"Robert","user_description":"I'm a tester"}]'),
     ¦                                                                                                                                ^
     ?
[INFO] Running build completed, took 15.9s

[INFO] Caching finalized dependency graph...
[INFO] 18.5s elapsed, 1/1 actions completed.
[INFO] 19.6s elapsed, 1/1 actions completed.
[INFO] Caching finalized dependency graph completed, took 3.7s

[SEVERE] Failed after 19.7s
@jonsamwell
Copy link
Owner

Thanks for this we'll get a fix in

@jonsamwell
Copy link
Owner

Fixed in 3.0.0-rc.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants