diff --git a/test/options/doge_comment_jump_wrap.vader b/test/options/doge_comment_jump_wrap.vader index d703f3ec..ccbd3528 100644 --- a/test/options/doge_comment_jump_wrap.vader +++ b/test/options/doge_comment_jump_wrap.vader @@ -4,7 +4,7 @@ Given php (PHP function without parameters where g:doge_comment_jump_wrap = 1): function myFunction() {} -Do (trigger doge): +Do (trigger doge and jump forward): :let g:doge_comment_jump_wrap = 0\ :let g:doge_comment_interactive = 1\ \ @@ -28,9 +28,31 @@ Expect php (generated comment with a description and @return tag): */ function myFunction() {} +# Jump backwards +Do (trigger doge and jump backwards): + :let g:doge_comment_jump_wrap = 0\ + :let g:doge_comment_interactive = 1\ + \ +# Trigger 2 characters. +# The cursor should stay on the first TODO item. + \ + \ + +Then (the first TODO item should be selected): + AssertEqual 2, line('.') + AssertEqual 4, col('.') + +Expect php (generated comment with a description and @return tag): + /** + * [TODO:description] + * + * @return [TODO:type] [TODO:description] + */ + function myFunction() {} + # ------------------------------------------------------------------------------ -Do (trigger doge): +Do (trigger doge and jump forward): :let g:doge_comment_jump_wrap = 1\ :let g:doge_comment_interactive = 1\ \ @@ -50,6 +72,27 @@ Expect php (generated comment with @param and @return tags): */ function myFunction() {} +# Jump backwards +Do (trigger doge and jump backwards): + :let g:doge_comment_jump_wrap = 1\ + :let g:doge_comment_interactive = 1\ + \ + \ + \ + \ + +Then (the first TODO item should be selected): + AssertEqual 2, line('.') + AssertEqual 4, col('.') + +Expect php (generated comment with @param and @return tags): + /** + * [TODO:description] + * + * @return [TODO:type] [TODO:description] + */ + function myFunction() {} + Do (let g:doge_comment_interactive = 0): # Disable the option again so that upcoming tests will not fail. :let g:doge_comment_interactive = 0\