Skip to content
Browse files

Started on feature tests for expand-region.

  • Loading branch information...
1 parent 76a8b19 commit 30806b208f80c5cb8b290d375b634e75be0277b1 @magnars committed Feb 3, 2012
Showing with 53 additions and 0 deletions.
  1. +6 −0 .gitmodules
  2. +20 −0 features/expand-region.feature
  3. +4 −0 features/step-definitions/expand-region-steps.el
  4. +21 −0 features/support/env.el
  5. +1 −0 util/ecukes
  6. +1 −0 util/espuds
View
6 .gitmodules
@@ -0,0 +1,6 @@
+[submodule "util/ecukes"]
+ path = util/ecukes
+ url = git://github.com/rejeep/ecukes.git
+[submodule "util/espuds"]
+ path = util/espuds
+ url = git://github.com/rejeep/espuds.git
View
20 features/expand-region.feature
@@ -0,0 +1,20 @@
+Feature: Expand Region
+ In order to quickly and precisely select semantic units
+ As an Emacs user
+ I want to expand to it
+
+ Scenario: Mark entire word with point midword
+ Given transient mark mode is active
+ And there is no region selected
+ When I insert "This is some text"
+ And I go to point "10"
+ And I expand the region
+ Then the region should be "some"
+
+ Scenario: Mark entire word with point just after
+ Given transient mark mode is active
+ And there is no region selected
+ When I insert "This is some text"
+ And I go to point "13"
+ And I expand the region
+ Then the region should be "some"
View
4 features/step-definitions/expand-region-steps.el
@@ -0,0 +1,4 @@
+(When "I expand the region"
+ (lambda ()
+ (flet ((message (&rest args) nil))
+ (er/expand-region 1))))
View
21 features/support/env.el
@@ -0,0 +1,21 @@
+(let* ((current-directory (file-name-directory load-file-name))
+ (features-directory (expand-file-name ".." current-directory))
+ (project-directory (expand-file-name ".." features-directory)))
+ (setq expand-region-root-path project-directory)
+ (setq expand-region-util-path (expand-file-name "util" project-directory)))
+
+(add-to-list 'load-path expand-region-root-path)
+(add-to-list 'load-path (expand-file-name "espuds" expand-region-util-path))
+
+(require 'expand-region)
+(require 'espuds)
+(require 'ert)
+
+(Before
+ (switch-to-buffer
+ (get-buffer-create "*expand-region*"))
+ (erase-buffer)
+ (transient-mark-mode 1)
+ (deactivate-mark))
+
+(After)
1 util/ecukes
@@ -0,0 +1 @@
+Subproject commit a9360b291412898eac4cb2905a04e1f5eadae321
1 util/espuds
@@ -0,0 +1 @@
+Subproject commit aeffd01fe8c257a6262ec3abf1d4f7d2c2ac949f

0 comments on commit 30806b2

Please sign in to comment.
Something went wrong with that request. Please try again.