mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2026-02-04 14:22:24 +00:00
Started adding feature tests.
This commit is contained in:
13
features/mark-multiple-integration.feature
Normal file
13
features/mark-multiple-integration.feature
Normal file
@@ -0,0 +1,13 @@
|
||||
Feature: Mark multiple integration
|
||||
In order to quickly and precisely get multiple cursors
|
||||
As an Emacs user with mark-multiple
|
||||
I want to mark multiple regions and then go to multiple-cursors-mode
|
||||
|
||||
Scenario: Mark two words and change them
|
||||
Given there is no region selected
|
||||
And delete-selection-mode is active
|
||||
When I insert "This text contains the word text twice"
|
||||
And I select "text"
|
||||
And I press "C->"
|
||||
And I type "sentence"
|
||||
Then I should see "This sentence contains the word sentence twice"
|
||||
3
features/step-definitions/multiple-cursors-steps.el
Normal file
3
features/step-definitions/multiple-cursors-steps.el
Normal file
@@ -0,0 +1,3 @@
|
||||
(And "^delete-selection-mode is active$"
|
||||
(lambda ()
|
||||
(delete-selection-mode 1)))
|
||||
27
features/support/env.el
Normal file
27
features/support/env.el
Normal file
@@ -0,0 +1,27 @@
|
||||
(let* ((current-directory (file-name-directory load-file-name))
|
||||
(features-directory (expand-file-name ".." current-directory))
|
||||
(project-directory (expand-file-name ".." features-directory)))
|
||||
(setq multiple-cursors-root-path project-directory)
|
||||
(setq multiple-cursors-util-path (expand-file-name "util" project-directory)))
|
||||
|
||||
(add-to-list 'load-path multiple-cursors-root-path)
|
||||
(add-to-list 'load-path (expand-file-name "espuds" multiple-cursors-util-path))
|
||||
(add-to-list 'load-path (expand-file-name "vendor" multiple-cursors-util-path))
|
||||
|
||||
(require 'mark-more-like-this)
|
||||
(require 'multiple-cursors)
|
||||
(require 'espuds)
|
||||
(require 'ert)
|
||||
|
||||
(Before
|
||||
(global-set-key (kbd "C->") 'mark-next-like-this)
|
||||
(switch-to-buffer
|
||||
(get-buffer-create "*multiple-cursors*"))
|
||||
(erase-buffer)
|
||||
(transient-mark-mode 1)
|
||||
(cua-mode 0)
|
||||
(delete-selection-mode 0)
|
||||
(setq set-mark-default-inactive nil)
|
||||
(deactivate-mark))
|
||||
|
||||
(After)
|
||||
Reference in New Issue
Block a user