#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)

  Scenario: Code samples
    Given I have some code examples
    """ruby
    class Calculator
      def multiply(x, y)
        x * y
      end
    end
    """
    And I have some code examples
    """rust
    fn safe_divide(x: f64, y: f64) -> Result<f64, &'static str> {
        match y {
            0.0 => Err("Division by zero"),
            _ => Ok(x / y),
        }
    }
    """
    And I have some code examples
    """ocaml
    let rec factorial = function
      | 0 -> 1
      | n -> n * factorial (n - 1)

    let () = Printf.printf "%d\n" (factorial 5)
    """
    And I have some code examples
    """json
    {
      "calculator": {
        "operations": ["add", "subtract", "multiply", "divide"],
        "precision": 2,
        "enabled": true
      }
    }
    """
    And I have some code examples
    """nonexistent-lang
    proc divide(x, y) {
      return x / y;
    }
    """
    And I have some code examples
    """
    def add(a, b)
      a + b
    end
    """
