mardi 12 février 2019

Newline character in cucumber scenario outline causing error

Working on a Cucumber feature here using a scenario outline where one of the values has a new line character like so:

Scenario Outline: Good stuff here
  Given I do some stuff
  Then I should see "<text>"

  Examples:
    | text                           |
    | text with a\nnewline character |

If I run this I get the error 765: unexpected token at text with a. If I run it with the newline and nothing after it like text with a\n it doesn't throw the error but for completeness I'd like to be able to check for the full string. Is this a limitation of Cucumber scenarios or is there a work around?

Aucun commentaire:

Enregistrer un commentaire