From e9c9c177c6147055cc7ac7429b9899d94b9901fa Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Fri, 1 May 2020 20:08:17 +0200 Subject: [PATCH] Add testdata for gherkin language --- lexers/testdata/gherkin.actual | 88 +++++++++++ lexers/testdata/gherkin.expected | 246 +++++++++++++++++++++++++++++++ 2 files changed, 334 insertions(+) create mode 100644 lexers/testdata/gherkin.actual create mode 100644 lexers/testdata/gherkin.expected diff --git a/lexers/testdata/gherkin.actual b/lexers/testdata/gherkin.actual new file mode 100644 index 000000000..b14454616 --- /dev/null +++ b/lexers/testdata/gherkin.actual @@ -0,0 +1,88 @@ +@foo34 @bar # some comment +Feature: proof of concept + + In order to read Cucumber features faster and eaiser on Github + As a Cucumber user + I want to have syntax highlighting for Gherkin + This is part of the narrative, even if I have the # symbol, it is still the narrative- not a comment + + Background: this is multi-line description + do you like it? + Given cheese is good + + Scenario Outline: this is a test + this the second line of the desctiption + Given I have a and some "string" + And the following table and some 'string' + | header 1 | header 2 | # here is a comment after a step table header + | cell 1-1 | cell 1-2 | # here is a comment after a step table row + | cell 2-1 | "cell 2-2" | + + When I do + And use apostrophes then the feature's syntax still looks good + And here is a string with single and double quotes- "i'll be back" + And here is a string with the opposite 'the quote is "Foo"' + And what about a var in a quote like so: "" + And what about a multiline string with a var in it like so: + """ + Hello! + I am a multiple line string, often called a pystring. + I can have regular "double quotes" without a problem... + I can also sub in vars as well like: and + """ + + Then I should see something... + But not something else... + + Examples: + | var1 | var2 | # i am a comment + | foo | bar | # so am i + | dog | food | + + Scenarios: some other examples with a description + and guess waht?!? I can have multilines as well! # look at me, I'm a comment + Who would have thunk? + | var1 | var2 | + | foo | bar | + | dog | food | + + @some_tag @another_tag + Scenario: more examples + will follow after this multi-line description + Given some context# this is an inline comment + # This is a comment +# So is this with no space at front... + +Funktionalität: Addition + Um dumme Fehler zu vermeiden + möchte ich als Matheidiot + die Summe zweier Zahlen gesagt bekommen + + Szenariogrundriss: Zwei Zahlen hinzufügen + Gegeben sei ich habe in den Taschenrechner eingegeben + Und ich habe in den Taschenrechner eingegeben + Wenn ich drücke + Dann sollte das Ergebniss auf dem Bildschirm sein + + Beispiele: + | Eingabe_1 | Eingabe_2 | Knopf | Ausgabe | + | 20 | 30 | add | 50 | + | 2 | 5 | add | 7 | + | 0 | 40 | add | 40 | + +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + + Scenario Outline: Add two numbers + Given I have entered into the calculator + * I have entered into the calculator + When I press