Skip to content

Commit

Permalink
Add tests for empty atx headings
Browse files Browse the repository at this point in the history
  • Loading branch information
lggruspe committed Sep 17, 2022
1 parent 5a3996b commit d23846e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/header-decrease.vader
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,29 @@ Expect (hashtags are not affected):
## a

#hashtag

Given markdown;
#

##

Execute (HeaderIncrease with empty atx headings):
:HeaderIncrease

Expect (increase level of all headers):
##

###

Given markdown;
##

###

Execute (HeaderDecrease with empty atx headings):
:HeaderDecrease

Expect (decrease level of all headers):
#

##
20 changes: 20 additions & 0 deletions test/map.vader
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,23 @@ Execute (]h):
AssertEqual line('.'), 3
normal ]h
AssertEqual line('.'), 1

Given markdown;
#

##

#

##

Execute (]] empty atx heading):
AssertEqual line('.'), 1
normal ]]
AssertEqual line('.'), 3
normal [[
AssertEqual line('.'), 1
normal ][
AssertEqual line('.'), 5
normal []
AssertEqual line('.'), 1

0 comments on commit d23846e

Please sign in to comment.