]> git.madduck.net Git - etc/vim.git/blob - test/test_filetype_guessing.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / test_filetype_guessing.vader
1 Before:
2     augroup TestFiletypeGroup
3         autocmd!
4         autocmd BufEnter,BufRead *.x setf xfiletype
5         autocmd BufEnter,BufRead *.y set filetype=yfiletype
6         autocmd BufEnter,BufRead *.z setlocal filetype=zfiletype
7         autocmd BufEnter,BufRead *.jsx set filetype=javascript.jsx
8     augroup END
9
10 After:
11   augroup TestFiletypeGroup
12       autocmd!
13   augroup END
14   augroup! TestFiletypeGroup
15
16 Execute(ALE should guess file extensions appropriately):
17   " The whole string should be used, if there's a match.
18   AssertEqual '.jsx', ale#filetypes#GuessExtension('javascript.jsx')
19   " The first part should be used.
20   AssertEqual '.x', ale#filetypes#GuessExtension('xfiletype.yfiletype')