Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copied html-mode tests for nxml-mode
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>" |