Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pilgrimlyieu committed Sep 26, 2023
1 parent 076a23d commit 094e673
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/test_Expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,35 @@ class SimpleExpand_Issue1343(_VimTest):
snippets = ("test", r"${1:\Safe\\}")
keys = "test" + EX + JF + "foo"
wanted = r"\Safe\foo"

class SimpleExpandJumpOrExpand_Expand(_VimTest):
snippets = ("hallo", "Hallo Welt!")
keys = "hallo" + EX
wanted = "Hallo Welt!"

def _extra_vim_config(self, vim_config):
vim_config.append('let g:UltiSnipsJumpOrExpandTrigger="<tab>"')

class SimpleExpandJumpOrExpand_Ambiguity(_VimTest):
snippets = ("test", r"test$1 foo$0")
keys = "test" + EX + EX + "foo"
wanted = "test foofoo"

def _extra_vim_config(self, vim_config):
vim_config.append('let g:UltiSnipsJumpOrExpandTrigger="<tab>"')

class SimpleExpandExpandOrJump_Expand(_VimTest):
snippets = ("hallo", "Hallo Welt!")
keys = "hallo" + EX
wanted = "Hallo Welt!"

def _extra_vim_config(self, vim_config):
vim_config.append('let g:UltiSnipsExpandOrJumpTrigger="<tab>"')

class SimpleExpandExpandOrJump_Ambiguity(_VimTest):
snippets = ("test", r"test$1 foo$0")
keys = "test" + EX + EX + "foo"
wanted = "testfoo foo foo"

def _extra_vim_config(self, vim_config):
vim_config.append('let g:UltiSnipsExpandOrJumpTrigger="<tab>"')

0 comments on commit 094e673

Please # to comment.