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
3 " This is just one language for the linter.
4 call ale#assert#SetUpLinterTest('rst', 'textlint')
6 " The configuration is shared between many languages.
7 Save g:ale_textlint_executable
8 Save g:ale_textlint_use_global
9 Save g:ale_textlint_options
11 let g:ale_textlint_executable = 'textlint'
12 let g:ale_textlint_use_global = 0
13 let g:ale_textlint_options = ''
15 unlet! b:ale_textlint_executable
16 unlet! b:ale_textlint_use_global
17 unlet! b:ale_textlint_options
20 unlet! b:ale_textlint_executable
21 unlet! b:ale_textlint_use_global
22 unlet! b:ale_textlint_options
24 call ale#assert#TearDownLinterTest()
26 Execute(The default textlint command should be correct):
27 AssertLinter 'textlint',
28 \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s'
30 Execute(The text executable and command should be configurable):
31 let b:ale_textlint_executable = 'foobar'
32 let b:ale_textlint_options = '--something'
34 AssertLinter 'foobar',
35 \ ale#Escape('foobar') . ' --something -f json --stdin --stdin-filename %s'
37 Execute(The local executable from .bin should be used if available):
38 call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt')
41 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'),
42 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'))
43 \ . ' -f json --stdin --stdin-filename %s'
45 Execute(The local executable from textlint/bin should be used if available):
46 call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt')
50 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
51 \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
52 \ . ' -f json --stdin --stdin-filename %s'
55 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
56 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
57 \ . ' -f json --stdin --stdin-filename %s'