From 61388fedef4792fea3622db4951e5eee4add402d Mon Sep 17 00:00:00 2001 From: Maciej Katafiasz Date: Thu, 5 Sep 2013 18:07:52 +0200 Subject: [PATCH] Add 'mark-all-dwim' tests for selection --- features/mark-all-dwim.feature | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/features/mark-all-dwim.feature b/features/mark-all-dwim.feature index 7870a6a..d1674c2 100644 --- a/features/mark-all-dwim.feature +++ b/features/mark-all-dwim.feature @@ -62,3 +62,31 @@ Feature: Mark all do-what-I-mean (defun def (humm) (message 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" + 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)) + """