From d44c8080bf4d82541f1cd46c319fcc288f9b5e47 Mon Sep 17 00:00:00 2001 From: Patrick Nevels Date: Sat, 25 Jan 2014 20:03:49 -0600 Subject: [PATCH] make demo more expressive --- demo/kitchen-sink/docs/gherkin.feature | 27 +++++++++++++++++++++----- lib/ace/mode/gherkin.js | 2 +- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/demo/kitchen-sink/docs/gherkin.feature b/demo/kitchen-sink/docs/gherkin.feature index ab31cdf1..6f8d0df4 100644 --- a/demo/kitchen-sink/docs/gherkin.feature +++ b/demo/kitchen-sink/docs/gherkin.feature @@ -1,10 +1,27 @@ Feature: Serve coffee - Coffee should not be served until paid for - Coffee should not be served until the button has been pressed - If there is no coffee left then money should be refunded + Coffee should not be served until paid for + Coffee should not be served until the button has been pressed + If there is no coffee left then money should be refunded + + Scenario Outline: Eating + Given there are cucumbers + When I eat cucumbers + Then I should have cucumbers + + Examples: + | start | eat | left | + | 12 | 5 | 7 | + | 20 | 5 | 15 | Scenario: Buy last coffee Given there are 1 coffees left in the machine - And I have deposited 1$ + And I have deposited 1$ When I press the coffee button - Then I should be served a coffee \ No newline at end of file + Then I should be served a "coffee" + + # this a comment + + """ + this is a + pystring + """ \ No newline at end of file diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js index 4a29f971..94dba209 100644 --- a/lib/ace/mode/gherkin.js +++ b/lib/ace/mode/gherkin.js @@ -33,7 +33,7 @@ oop.inherits(Mode, TextMode); if (state == "start") { - if (line.match("Scenario:|Feature:|Scenario\ Outline:")) { + if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) { indent += space2; } else if(line.match("(Given|Then).+(:)$|Examples:")) { indent += space2;