2014-07-19 11:45:44 -04:00
|
|
|
from test.vim_test_case import VimTestCase as _VimTest
|
|
|
|
from test.constant import *
|
|
|
|
|
|
|
|
# List Snippets {{{#
|
2015-01-20 15:26:03 -05:00
|
|
|
|
|
|
|
|
2014-07-19 11:45:44 -04: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'),
|
|
|
|
)
|
|
|
|
|
2014-07-19 11:45:44 -04:00
|
|
|
|
|
|
|
class ListAllAvailable_NothingTyped_ExpectCorrectResult(_ListAllSnippets):
|
2015-01-20 15:26:03 -05:00
|
|
|
keys = '' + LS + '3\n'
|
|
|
|
wanted = 'BLAAH'
|
|
|
|
|
|
|
|
|
2014-07-19 11:45:44 -04:00
|
|
|
class ListAllAvailable_SpaceInFront_ExpectCorrectResult(_ListAllSnippets):
|
2015-01-20 15:26:03 -05:00
|
|
|
keys = ' ' + LS + '3\n'
|
|
|
|
wanted = ' BLAAH'
|
|
|
|
|
|
|
|
|
2014-07-19 11:45:44 -04:00
|
|
|
class ListAllAvailable_BraceInFront_ExpectCorrectResult(_ListAllSnippets):
|
2015-01-20 15:26:03 -05:00
|
|
|
keys = '} ' + LS + '3\n'
|
|
|
|
wanted = '} BLAAH'
|
|
|
|
|
|
|
|
|
2014-07-19 11:45:44 -04:00
|
|
|
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'
|
|
|
|
|
2014-07-19 11:45:44 -04:00
|
|
|
|
|
|
|
class ListAllAvailable_NonDefined_NoExpectionShouldBeRaised(_ListAllSnippets):
|
2015-01-20 15:26:03 -05:00
|
|
|
keys = 'hallo qualle' + LS + 'Hi'
|
|
|
|
wanted = 'hallo qualleHi'
|
2014-07-19 11:45:44 -04:00
|
|
|
# End: List Snippets #}}}
|