branch: elpa/multiple-cursors
commit bf4b0c669b91b5a227d539c76e7147047f87c080
Author: Maciej Katafiasz <[email protected]>
Commit: Maciej Katafiasz <[email protected]>
Refactor mark-dwim tests to share a common background
---
features/mark-all-dwim.feature | 30 +++++++-----------------------
1 file changed, 7 insertions(+), 23 deletions(-)
diff --git a/features/mark-all-dwim.feature b/features/mark-all-dwim.feature
index a81ad92..4bb1702 100644
--- a/features/mark-all-dwim.feature
+++ b/features/mark-all-dwim.feature
@@ -1,13 +1,16 @@
Feature: Mark all do-what-I-mean
- Scenario: Mark symbols in defun
+ 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-$"
@@ -27,15 +30,7 @@ Feature: Mark all do-what-I-mean
(defun def (ghi) (message some-other-ghi))
"""
-
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"
And I press "M-f"
And I press "M-$"
@@ -44,10 +39,10 @@ Feature: Mark all do-what-I-mean
Then I should see:
"""
(defun abc (hmm) (message hmm))
- (defun def (hmm) (message hmm))
+ (defun def (hmm) (message some-other-hmm))
"""
When I press "C-g"
- And I press "M-> RET"
+ And I press "M->"
And I insert:
"""
(defun def (hmm-hmm) (message hmm))
@@ -59,19 +54,11 @@ Feature: Mark all do-what-I-mean
Then I should see:
"""
(defun abc (humm) (message humm))
- (defun def (humm) (message humm))
+ (defun def (humm) (message some-other-humm))
(defun def (humm-humm) (message humm))
"""
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-<"
And I press "S-M->"
And I press "C-$ ghi RET"
@@ -80,7 +67,6 @@ Feature: Mark all do-what-I-mean
"""
(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"
@@ -91,7 +77,6 @@ Feature: Mark all do-what-I-mean
"""
(defun abc (foo) (message foo))
(defun def (xyz) (message some-other-xyz))
-
"""
When I press "C-g"
And I press "M-<"
@@ -102,5 +87,4 @@ Feature: Mark all do-what-I-mean
"""
;;(defun abc (foo) (message foo))
;;(defun def (xyz) (message some-other-xyz))
-
"""