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('markdown', '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 textlint command should be correct):
29 AssertLinter 'textlint',
30 \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s'
32 Execute(The textlint executable and options should be configurable):
33 let b:ale_textlint_executable = 'foobar'
34 let b:ale_textlint_options = '--something'
36 AssertLinter 'foobar',
37 \ ale#Escape('foobar') . ' --something -f json --stdin --stdin-filename %s'
39 Execute(The local executable from .bin should be used if available):
40 call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt')
43 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'),
44 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'))
45 \ . ' -f json --stdin --stdin-filename %s'
47 Execute(The local executable from textlint/bin should be used if available):
48 call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt')
52 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
53 \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
54 \ . ' -f json --stdin --stdin-filename %s'
57 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
58 \ 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'