mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 05:03:03 +00:00
Refactor mark-dwim tests to share a common background
This commit is contained in:
parent
45ed43e1f8
commit
bf4b0c669b
@ -1,13 +1,16 @@
|
|||||||
Feature: Mark all do-what-I-mean
|
Feature: Mark all do-what-I-mean
|
||||||
|
|
||||||
Scenario: Mark symbols in defun
|
Background:
|
||||||
Given I turn on emacs-lisp-mode
|
Given I turn on emacs-lisp-mode
|
||||||
And I turn on delete-selection-mode
|
And I turn on delete-selection-mode
|
||||||
And I insert:
|
And I insert:
|
||||||
"""
|
"""
|
||||||
(defun abc (ghi) (message ghi))
|
(defun abc (ghi) (message ghi))
|
||||||
(defun def (ghi) (message some-other-ghi))
|
(defun def (ghi) (message some-other-ghi))
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Scenario: Mark symbols in defun
|
||||||
When I go to the end of the word "abc"
|
When I go to the end of the word "abc"
|
||||||
And I press "M-f"
|
And I press "M-f"
|
||||||
And I press "M-$"
|
And I press "M-$"
|
||||||
@ -27,15 +30,7 @@ Feature: Mark all do-what-I-mean
|
|||||||
(defun def (ghi) (message some-other-ghi))
|
(defun def (ghi) (message some-other-ghi))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
Scenario: Mark all symbols by pressing twice
|
Scenario: Mark all symbols by pressing twice
|
||||||
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 ghi))
|
|
||||||
"""
|
|
||||||
When I go to the end of the word "abc"
|
When I go to the end of the word "abc"
|
||||||
And I press "M-f"
|
And I press "M-f"
|
||||||
And I press "M-$"
|
And I press "M-$"
|
||||||
@ -44,10 +39,10 @@ Feature: Mark all do-what-I-mean
|
|||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
(defun abc (hmm) (message hmm))
|
(defun abc (hmm) (message hmm))
|
||||||
(defun def (hmm) (message hmm))
|
(defun def (hmm) (message some-other-hmm))
|
||||||
"""
|
"""
|
||||||
When I press "C-g"
|
When I press "C-g"
|
||||||
And I press "M-> RET"
|
And I press "M->"
|
||||||
And I insert:
|
And I insert:
|
||||||
"""
|
"""
|
||||||
(defun def (hmm-hmm) (message hmm))
|
(defun def (hmm-hmm) (message hmm))
|
||||||
@ -59,19 +54,11 @@ Feature: Mark all do-what-I-mean
|
|||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
(defun abc (humm) (message humm))
|
(defun abc (humm) (message humm))
|
||||||
(defun def (humm) (message humm))
|
(defun def (humm) (message some-other-humm))
|
||||||
(defun def (humm-humm) (message humm))
|
(defun def (humm-humm) (message humm))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Scenario: Mark dwim from selection
|
Scenario: Mark dwim from selection
|
||||||
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))
|
|
||||||
|
|
||||||
"""
|
|
||||||
When I press "M-<"
|
When I press "M-<"
|
||||||
And I press "S-M->"
|
And I press "S-M->"
|
||||||
And I press "C-$ ghi RET"
|
And I press "C-$ ghi RET"
|
||||||
@ -80,7 +67,6 @@ Feature: Mark all do-what-I-mean
|
|||||||
"""
|
"""
|
||||||
(defun abc (xyz) (message xyz))
|
(defun abc (xyz) (message xyz))
|
||||||
(defun def (xyz) (message some-other-xyz))
|
(defun def (xyz) (message some-other-xyz))
|
||||||
|
|
||||||
"""
|
"""
|
||||||
When I press "C-g"
|
When I press "C-g"
|
||||||
And I go to the front of the word "xyz"
|
And I go to the front of the word "xyz"
|
||||||
@ -91,7 +77,6 @@ Feature: Mark all do-what-I-mean
|
|||||||
"""
|
"""
|
||||||
(defun abc (foo) (message foo))
|
(defun abc (foo) (message foo))
|
||||||
(defun def (xyz) (message some-other-xyz))
|
(defun def (xyz) (message some-other-xyz))
|
||||||
|
|
||||||
"""
|
"""
|
||||||
When I press "C-g"
|
When I press "C-g"
|
||||||
And I press "M-<"
|
And I press "M-<"
|
||||||
@ -102,5 +87,4 @@ Feature: Mark all do-what-I-mean
|
|||||||
"""
|
"""
|
||||||
;;(defun abc (foo) (message foo))
|
;;(defun abc (foo) (message foo))
|
||||||
;;(defun def (xyz) (message some-other-xyz))
|
;;(defun def (xyz) (message some-other-xyz))
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user