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 Oct 25, 2022
1 parent 7b9425e commit aa0dafb
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 aa0dafb

Please sign in to comment.