settings

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

mark-all-dwim.feature (2198B)


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
82
83
84
85
86
87
88
89
90
Feature: Mark all do-what-I-mean

  Background:
    Given I turn on emacs-lisp-mode
    And I turn on delete-selection-mode
    And I insert:
    """
    (defun abc (ghi) (message ghi))
    (defun def (ghi) (message some-other-ghi))

    """

  Scenario: Mark symbols in defun
    When I go to the end of the word "abc"
    And I press "M-f"
    And I press "M-$"
    And I type "hmm"
    Then I should see:
    """
    (defun abc (hmm) (message hmm))
    (defun def (ghi) (message some-other-ghi))
    """
    When I press "C-g"
    And I go to the front of the word "hmm"
    And I press "C-$"
    And I type "foo"
    Then I should see:
    """
    (defun abc (foo) (message foo))
    (defun def (ghi) (message some-other-ghi))
    """
    
  Scenario: Mark all symbols by pressing twice
    When I go to the end of the word "abc"
    And I press "M-f"
    And I press "M-$"
    And I press "M-$"
    And I type "hmm"
    Then I should see:
    """
    (defun abc (hmm) (message hmm))
    (defun def (hmm) (message some-other-hmm))
    """
    When I press "C-g"
    And I press "M->"
    And I insert:
    """
    (defun def (hmm-hmm) (message hmm))
    """
    And I go to the front of the word "hmm"
    And I press "C-$"
    And I press "C-$"
    And I type "humm"
    Then I should see:
    """
    (defun abc (humm) (message humm))
    (defun def (humm) (message some-other-humm))
    (defun def (humm-humm) (message humm))
    """

  Scenario: Mark dwim from selection
    When I press "M-<"
    And I press "S-M->"
    And I press "C-$ ghi RET"
    And I type "xyz"
    Then I should see:
    """
    (defun abc (xyz) (message xyz))
    (defun def (xyz) (message some-other-xyz))
    """
    When I press "C-g"
    And I go to the front of the word "xyz"
    And I press "C-M-SPC"
    And I press "C-$"
    And I type "foo"
    Then I should see:
    """
    (defun abc (foo) (message foo))
    (defun def (xyz) (message some-other-xyz))
    """
    When I press "C-g"
    And I press "M-<"
    And I press "S-M->"
    And I press "C-u C-$"
    And I type ";;"
    Then I should see:
    """
    ;;(defun abc (foo) (message foo))
    ;;(defun def (xyz) (message some-other-xyz))
    """