File: gherkin

package info (click to toggle)
ruby-rouge 4.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,844 kB
  • sloc: ruby: 38,489; sed: 2,071; perl: 152; makefile: 8
file content (81 lines) | stat: -rw-r--r-- 1,820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#Comment on line 1
#Comment on line 2
@tag1 @tag2
Feature: Feature Text
  In order to test multiline forms
  As a ragel writer
  I need to check for complex combinations

  #Comment on line 9

  #Comment on line 11

  Background:
    Given this is a background step
    And this is another one

  @tag3 @tag4
  Scenario: Reading a Scenario
    Given there is a step
    But not another step

  @tag3
  Scenario: Reading a second scenario
    With two lines of text
    #Comment on line 24
    Given a third step with a table
    |a|b|
    |c|d|
    |e|f|
    And I am still testing things
      |g|h|
      |e|r|
      |k|i|
      |n||
    And I am done testing these tables
    #Comment on line 29
    Then I am happy

  Scenario: Hammerzeit
    Given All work and no play
      """
      Makes Homer something something
      And something else
      """
    Then crazy

  Scenario Outline: Variable highlighting
    Given a variable <foo>
    When <foo> is surrounded by punctuation like (<foo> or <bar>)
    Then all variables should be highlighted properly.

    Examples:
      | foo  | bar |
      | 1    | 2   |
      | good | bad |

#language:zh-CN
功能:加法

  场景: 两个数相加
    假如我已经在计算器里输入6
    而且我已经在计算器里输入7
    当我按相加按钮
    那么我应该在屏幕上看到的结果是13

Feature: Highlander

  Rule: There can be only One

    Example: Only One -- More than one alive
      Given there are 3 ninjas
      And there are more than one ninja alive
      When 2 ninjas meet, they will fight
      Then one ninja dies (but not me)
      And there is one ninja less alive

    Example: Only One -- One alive
      Given there is only 1 ninja alive
      Then he (or she) will live forever ;-)

  Rule: There can be Two (in some cases)