mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 21:03:05 +00:00
Tests for white-list prompt.
This commit is contained in:
parent
c34e4df444
commit
4c56cb8b78
@ -43,6 +43,20 @@ Feature: Multiple cursors core
|
|||||||
And I type ")"
|
And I type ")"
|
||||||
Then I should see "This (text contains) the word (text twice)"
|
Then I should see "This (text contains) the word (text twice)"
|
||||||
|
|
||||||
|
Scenario: Unknown command: yes, do for all
|
||||||
|
Given I have bound C-! to a new command that inserts "a"
|
||||||
|
And I have cursors at "text" in "This text contains the word text twice"
|
||||||
|
When I press "C-! y"
|
||||||
|
And I press "C-!"
|
||||||
|
Then I should see "This aatext contains the word aatext twice"
|
||||||
|
|
||||||
|
Scenario: Unknown command: no, don't do for all
|
||||||
|
Given I have bound C-! to another new command that inserts "a"
|
||||||
|
And I have cursors at "text" in "This text contains the word text twice"
|
||||||
|
When I press "C-! n"
|
||||||
|
And I press "C-!"
|
||||||
|
Then I should see "This aatext contains the word text twice"
|
||||||
|
|
||||||
Scenario: Setting and popping mark
|
Scenario: Setting and popping mark
|
||||||
Given I have cursors at "text" in "This text contains the word text twice"
|
Given I have cursors at "text" in "This text contains the word text twice"
|
||||||
And I press "C-SPC"
|
And I press "C-SPC"
|
||||||
|
@ -52,3 +52,15 @@
|
|||||||
(lambda (ins)
|
(lambda (ins)
|
||||||
(lexical-let ((ins ins))
|
(lexical-let ((ins ins))
|
||||||
(global-set-key (kbd "C-!") #'(lambda () (interactive) (insert ins))))))
|
(global-set-key (kbd "C-!") #'(lambda () (interactive) (insert ins))))))
|
||||||
|
|
||||||
|
(Given "^I have bound C-! to a new command that inserts \"\\(.+\\)\"$"
|
||||||
|
(lambda (ins)
|
||||||
|
(lexical-let ((ins ins))
|
||||||
|
(defun mc-test-temp-command () (interactive) (insert ins))
|
||||||
|
(global-set-key (kbd "C-!") 'mc-test-temp-command))))
|
||||||
|
|
||||||
|
(Given "^I have bound C-! to another new command that inserts \"\\(.+\\)\"$"
|
||||||
|
(lambda (ins)
|
||||||
|
(lexical-let ((ins ins))
|
||||||
|
(defun mc-test-temp-command-2 () (interactive) (insert ins))
|
||||||
|
(global-set-key (kbd "C-!") 'mc-test-temp-command-2))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user