blob: fa54312973809f1b51ce061b8d532e4211b0eb7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Before:
augroup TestFiletypeGroup
autocmd!
autocmd BufEnter,BufRead *.x setf xfiletype
autocmd BufEnter,BufRead *.y set filetype=yfiletype
autocmd BufEnter,BufRead *.z setlocal filetype=zfiletype
autocmd BufEnter,BufRead *.jsx set filetype=javascript.jsx
augroup END
After:
augroup TestFiletypeGroup
autocmd!
augroup END
augroup! TestFiletypeGroup
Execute(ALE should guess file extensions appropriately):
" The whole string should be used, if there's a match.
AssertEqual '.jsx', ale#filetypes#GuessExtension('javascript.jsx')
" The first part should be used.
AssertEqual '.x', ale#filetypes#GuessExtension('xfiletype.yfiletype')
|