From 94af07453dd491408d42d0c867002010678e40f7 Mon Sep 17 00:00:00 2001 From: Magnar Sveen Date: Fri, 7 Jun 2013 08:03:05 +0200 Subject: [PATCH] Add some readability enhancing step definitions --- features/multiple-cursors-core.feature | 4 +-- .../multiple-cursors-steps.el | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/features/multiple-cursors-core.feature b/features/multiple-cursors-core.feature index 8d8fb65..cd308cd 100644 --- a/features/multiple-cursors-core.feature +++ b/features/multiple-cursors-core.feature @@ -115,7 +115,7 @@ Feature: Multiple cursors core And I go to the front of the word "text" And I press "C-SPC" And I press "M-f" - And I press "C->" + And I mark next like this And I type "!" Then I should see "This ! contains the word ! twice" @@ -124,7 +124,7 @@ Feature: Multiple cursors core And I insert "This text contains the word text twice" And I go to the front of the word "text" And I press "C-M-SPC" - And I press "C->" + And I mark next like this And I press "C-g" And I type "(" Then I should see "This (text contains the word (text twice" diff --git a/features/step-definitions/multiple-cursors-steps.el b/features/step-definitions/multiple-cursors-steps.el index e3686ef..a0052fd 100644 --- a/features/step-definitions/multiple-cursors-steps.el +++ b/features/step-definitions/multiple-cursors-steps.el @@ -1,3 +1,33 @@ +(When "^I mark next like this$" + (lambda () (call-interactively 'mc/mark-next-like-this))) + +(When "^I mark previous like this$" + (lambda () (call-interactively 'mc/mark-previous-like-this))) + +(When "^I mark all like this$" + (lambda () (call-interactively 'mc/mark-all-like-this))) + +(When "^I mark all like this dwim$" + (lambda () (call-interactively 'mc/mark-all-like-this-dwim))) + +(When "^I mark all in region$" + (lambda () (call-interactively 'mc/mark-all-in-region))) + +(When "^I insert numbers$" + (lambda () (call-interactively 'mc/insert-numbers))) + +(When "^I reverse regions$" + (lambda () (call-interactively 'mc/reverse-regions))) + +(When "^I sort regions$" + (lambda () (call-interactively 'mc/sort-regions))) + +(When "^I edit lines$" + (lambda () (call-interactively 'mc/edit-lines))) + +(When "^I set rectangular region anchor$" + (lambda () (call-interactively 'set-rectangular-region-anchor))) + (And "^delete-selection-mode is active$" (lambda () (delete-selection-mode 1)))