Skip to content

Commit

Permalink
Copied html-mode tests for nxml-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gvol committed Mar 13, 2012
1 parent 4862cc8 commit 182b749
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions features/nxml-mode-expansions.feature
@@ -0,0 +1,69 @@
Feature: nxml-mode expansions
In order to quickly and precisely mark xml units
As an Emacs user
I want to expand to them

Scenario: Mark xml attribute from start
Given I turn on nxml-mode
And there is no region selected
When I insert "<div id="5">"
And I place the cursor between " " and "id"
And I expand the region 2 times
Then the region should be "id="5""

Scenario: Mark xml attribute from end
Given I turn on nxml-mode
And there is no region selected
When I insert "<div id="5" bob="er">"
And I go to point "12"
# And I place the cursor between "'" and ">"
And I expand the region 2 times
Then the region should be "id="5""

Scenario: Mark xml tags, part 1
Given I turn on nxml-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I expand the region
Then the region should be "<span>"

Scenario: Mark xml tags, part 2
Given I turn on nxml-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I expand the region 2 times
Then the region should be "<span></span>"

Scenario: Mark xml tags, part 3
Given I turn on nxml-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I expand the region 3 times
Then the region should be "before <span></span>"

Scenario: Mark xml tags, part 4
Given I turn on nxml-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I expand the region 4 times
Then the region should be "<div>before <span></span></div>"

Scenario: Mark xml tags, part 5
Given I turn on nxml-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I expand the region 5 times
Then the region should be "<div>before <span></span></div> after"

Scenario: Mark xml tags, part 6
Given I turn on nxml-mode
And there is no region selected
When I insert "... <div class='hi'><div>before <span></span></div> after</div> ..."
And I place the cursor between "before " and "<span>"
And I expand the region 6 times
Then the region should be "<div class='hi'><div>before <span></span></div> after</div>"

0 comments on commit 182b749

Please sign in to comment.