UltiSnips/test/test_ListSnippets.py

44 lines
1.1 KiB
Python
Raw Normal View History

from test.vim_test_case import VimTestCase as _VimTest
from test.constant import *
# List Snippets {{{#
2015-01-20 15:26:03 -05:00
class _ListAllSnippets(_VimTest):
2015-01-20 15:26:03 -05:00
snippets = (('testblah', 'BLAAH', 'Say BLAH'),
('test', 'TEST ONE', 'Say tst one'),
('aloha', 'OHEEEE', 'Say OHEE'),
)
class ListAllAvailable_NothingTyped_ExpectCorrectResult(_ListAllSnippets):
2015-01-20 15:26:03 -05:00
keys = '' + LS + '3\n'
wanted = 'BLAAH'
class ListAllAvailable_SpaceInFront_ExpectCorrectResult(_ListAllSnippets):
2015-01-20 15:26:03 -05:00
keys = ' ' + LS + '3\n'
wanted = ' BLAAH'
class ListAllAvailable_BraceInFront_ExpectCorrectResult(_ListAllSnippets):
2015-01-20 15:26:03 -05:00
keys = '} ' + LS + '3\n'
wanted = '} BLAAH'
class ListAllAvailable_testtyped_ExpectCorrectResult(_ListAllSnippets):
2015-01-20 15:26:03 -05:00
keys = 'hallo test' + LS + '2\n'
wanted = 'hallo BLAAH'
class ListAllAvailable_testtypedSecondOpt_ExpectCorrectResult(
_ListAllSnippets):
keys = 'hallo test' + LS + '1\n'
wanted = 'hallo TEST ONE'
class ListAllAvailable_NonDefined_NoExpectionShouldBeRaised(_ListAllSnippets):
2015-01-20 15:26:03 -05:00
keys = 'hallo qualle' + LS + 'Hi'
wanted = 'hallo qualleHi'
# End: List Snippets #}}}