Sha256: 7f06c47f9124d99934469c2831cc61a2d8fcbc7fc73d49d76d2f3188eedd8287

Contents?: true

Size: 1.93 KB

Versions: 38

Compression:

Stored size: 1.93 KB

Contents

Feature: Navigation and editing keys have special behaviour in a REPL

  Background:
    When I open a new repl
    And I insert "clear" at the cursor
    And I press the return key
    And I insert "x = 4" at the cursor
    When I move the cursor to the end of the document

  Scenario: Backspace does not erase the prompt
    And I press the backspace key
    Then the current command should be "x = "
    When I press the backspace key
    Then the current command should be "x ="
    When I press the backspace key
    Then the current command should be "x "
    When I press the backspace key
    Then the current command should be "x"
    When I press the backspace key
    Then the current command should be blank
    When I press the backspace key
    Then the current command should be blank
    And I should see ">> " in the edit tab

  Scenario: Delete does not erase the prompt
    When I move the cursor to 0
    And I press the delete key
    Then the current command should be "x = 4"
    And I should see ">> " in the edit tab

  Scenario: The home key sets the cursor at the start of the line and after the prompt
    When I press the home key
    Then the cursor should be at 3
    When I replace 3 to 8 with "x = 4\ny = 9"
    And I move the cursor to 11
    And I press the home key
    Then the cursor should be at 9

  Scenario: Left and right arrow keys can be used to navigate the current command
    When I press the left arrow key
    Then the cursor should be at 7
    When I press the left arrow key
    Then the cursor should be at 6
    When I press the left arrow key
    Then the cursor should be at 5
    When I press the right arrow key
    Then the cursor should be at 6

  Scenario: The left arrow key should not go beyond the prompt
    When I press the return key
    And I insert "clear" at the cursor
    And I press the return key
    Then the cursor should be at 3
    When I press the left arrow key
    Then the cursor should be at 3

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
redcar-0.13 plugins/repl/features/command_editing.feature
redcar-dev-0.13.5dev plugins/repl/features/command_editing.feature
redcar-dev-0.13.4dev plugins/repl/features/command_editing.feature
redcar-dev-0.13.3dev plugins/repl/features/command_editing.feature
redcar-dev-0.13.2dev plugins/repl/features/command_editing.feature
redcar-dev-0.13.1dev plugins/repl/features/command_editing.feature
redcar-0.12.1 plugins/repl/features/command_editing.feature
redcar-dev-0.13.0dev plugins/repl/features/command_editing.feature
redcar-0.12 plugins/repl/features/command_editing.feature
redcar-dev-0.12.27dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.26dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.25dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.24dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.23dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.22dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.21dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.20dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.19dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.18dev plugins/repl/features/command_editing.feature
redcar-dev-0.12.17dev plugins/repl/features/command_editing.feature