Skip to content

Commit

Permalink
Should be able to parse neovim syntax when enable_neovim is true
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuniwak committed Feb 12, 2016
1 parent 7733870 commit e9806a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixture/ast/fixture_to_parse_neovim.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tnoremap <C-h> <C-\><C-n><C-w>h
7 changes: 7 additions & 0 deletions test/unit/vint/ast/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
FIXTURE_FILE = get_fixture_path('fixture_to_parse.vim')
FIXTURE_FILE_EMPTY = get_fixture_path('fixture_to_parse_empty_file.vim')
FIXTURE_FILE_FF_DOS_FENC_CP932 = get_fixture_path('fixture_to_parse_windows.vim')
FIXTURE_FILE_NEOVIM = get_fixture_path('fixture_to_parse_neovim.vim')


class TestParser(unittest.TestCase):
Expand All @@ -21,6 +22,12 @@ def test_parse_file_on_ff_dos_and_fenc_cp932(self):
self.assertIs(ast['type'], 1)


def test_parse_file_when_neovim_enabled(self):
parser = Parser(enable_neovim=True)
ast = parser.parse_file(FIXTURE_FILE_NEOVIM)
self.assertIs(ast['type'], 1)


def test_parse_empty_file(self):
parser = Parser()
ast = parser.parse_file(FIXTURE_FILE_EMPTY)
Expand Down

0 comments on commit e9806a5

Please sign in to comment.