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('asciidoc', '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
21 unlet! b:ale_textlint_executable
22 unlet! b:ale_textlint_use_global
23 unlet! b:ale_textlint_options
25 call ale#assert#TearDownLinterTest()
27 Execute(The default command should be correct):
28 AssertLinter 'textlint',
29 \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s'
31 Execute(The executable and options should be configurable):
32 let b:ale_textlint_executable = 'foobar'
33 let b:ale_textlint_options = '--something'
35 AssertLinter 'foobar',
36 \ ale#Escape('foobar') . ' --something -f json --stdin --stdin-filename %s'
38 Execute(The local executable from .bin should be used if available):
39 call ale#test#SetFilename('../test-files/textlint/with_bin_path/foo.txt')
42 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'),
43 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_bin_path/node_modules/.bin/textlint'))
44 \ . ' -f json --stdin --stdin-filename %s'
46 Execute(The local executable from textlint/bin should be used if available):
47 call ale#test#SetFilename('../test-files/textlint/with_textlint_bin_path/foo.txt')
51 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
52 \ ale#Escape('node.exe') . ' ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
53 \ . ' -f json --stdin --stdin-filename %s'
56 \ ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'),
57 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/textlint/with_textlint_bin_path/node_modules/textlint/bin/textlint.js'))
58 \ . ' -f json --stdin --stdin-filename %s'