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.
1 " Author: januswel, w0rp
4 " This is just one language for the linter.
5 call ale#assert#SetUpLinterTest('tex', 'textlint')
7 " The configuration is shared between many languages.
8 Save g:ale_textlint_executable
9 Save g:ale_textlint_use_global
10 Save g:ale_textlint_options
12 let g:ale_textlint_executable = 'textlint'
13 let g:ale_textlint_use_global = 0
14 let g:ale_textlint_options = ''
16 unlet! b:ale_textlint_executable
17 unlet! b:ale_textlint_use_global
18 unlet! b:ale_textlint_options
22 unlet! b:ale_textlint_executable
23 unlet! b:ale_textlint_use_global
24 unlet! b:ale_textlint_options
26 call ale#assert#TearDownLinterTest()
28 Execute(The default command should be correct):
29 AssertLinter 'textlint',
30 \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s'
32 Execute(The executable should be configurable):
33 let b:ale_textlint_executable = 'foobar'
35 AssertLinter 'foobar',
36 \ ale#Escape('foobar') . ' -f json --stdin --stdin-filename %s'
38 Execute(The options should be configurable):
39 let b:ale_textlint_options = '--something'
41 AssertLinter 'textlint',
42 \ ale#Escape('textlint') . ' --something -f json --stdin --stdin-filename %s'
44 Execute(The local executable from .bin should be used if available):
45 call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt')
48 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'),
49 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'))
50 \ . ' -f json --stdin --stdin-filename %s'
52 Execute(The local executable from textlint/bin should be used if available):
53 call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt')
57 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
58 \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
59 \ . ' -f json --stdin --stdin-filename %s'
62 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
63 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
64 \ . ' -f json --stdin --stdin-filename %s'