Add basic tests for 'mc/mark-all-dwim'

This commit is contained in:
Maciej Katafiasz 2013-09-05 17:03:33 +02:00
parent 45c6cd0be4
commit 49027c6717
2 changed files with 27 additions and 0 deletions

View File

@ -17,6 +17,16 @@ Feature: Mark all do-what-I-mean
(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
Given I turn on emacs-lisp-mode
@ -36,3 +46,19 @@ Feature: Mark all do-what-I-mean
(defun abc (hmm) (message hmm))
(defun def (hmm) (message hmm))
"""
When I press "C-g"
And I press "M-> RET"
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 humm))
(defun def (humm-humm) (message humm))
"""

View File

@ -24,6 +24,7 @@
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "M-!") 'mc/mark-all-like-this)
(global-set-key (kbd "M-$") 'mc/mark-all-like-this-dwim)
(global-set-key (kbd "C-$") 'mc/mark-all-dwim)
(global-set-key (kbd "M-#") 'mc/mark-all-in-region)
(global-set-key (kbd "H-0") 'mc/insert-numbers)
(global-set-key (kbd "H-1") 'mc/reverse-regions)