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.
2 " This is just one example of a language using the linter.
3 call ale#assert#SetUpLinterTest('markdown', 'writegood')
5 " The options are shared between many languages.
6 Save g:ale_writegood_options
7 Save g:ale_writegood_executable
8 Save g:ale_writegood_use_global
10 unlet! g:ale_writegood_options
11 unlet! g:ale_writegood_executable
12 unlet! g:ale_writegood_use_global
14 call ale#test#SetFilename('testfile.txt')
15 call ale#handlers#writegood#ResetOptions()
18 call ale#assert#TearDownLinterTest()
20 Execute(The global executable should be used when the local one cannot be found):
23 \ ale#Escape('write-good') . ' %t',
25 Execute(The options should be used in the command):
26 let g:ale_writegood_options = '--foo --bar'
30 \ ale#Escape('write-good') . ' --foo --bar %t',
32 Execute(Should use the node_modules/.bin executable, if available):
33 call ale#test#SetFilename('../test-files/write-good/node-modules/test.txt')
36 \ ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules/node_modules/.bin/write-good'),
37 \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules/node_modules/.bin/write-good'))
40 Execute(Should use the node_modules/write-good executable, if available):
41 call ale#test#SetFilename('../test-files/write-good/node-modules-2/test.txt')
44 \ ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules-2/node_modules/write-good/bin/write-good.js'),
45 \ (has('win32') ? 'node.exe ' : '')
46 \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/write-good/node-modules-2/node_modules/write-good/bin/write-good.js'))
49 Execute(Should let users configure a global executable and override local paths):
50 call ale#test#SetFilename('../test-files/write-good/node-modules-2/test.txt')
52 let g:ale_writegood_executable = 'foo-bar'
53 let g:ale_writegood_use_global = 1
55 AssertLinter 'foo-bar', ale#Escape('foo-bar') . ' %t'