]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/linter/test_asciidoc_textlint.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / ale / test / linter / test_asciidoc_textlint.vader
1 " Author: januswel, w0rp
2
3 Before:
4   " This is just one language for the linter.
5   call ale#assert#SetUpLinterTest('asciidoc', 'textlint')
6
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
11
12   let g:ale_textlint_executable = 'textlint'
13   let g:ale_textlint_use_global = 0
14   let g:ale_textlint_options = ''
15
16   unlet! b:ale_textlint_executable
17   unlet! b:ale_textlint_use_global
18   unlet! b:ale_textlint_options
19
20 After:
21   unlet! b:ale_textlint_executable
22   unlet! b:ale_textlint_use_global
23   unlet! b:ale_textlint_options
24
25   call ale#assert#TearDownLinterTest()
26
27 Execute(The default command should be correct):
28   AssertLinter 'textlint',
29   \ ale#Escape('textlint') . ' -f json --stdin --stdin-filename %s'
30
31 Execute(The executable and options should be configurable):
32   let b:ale_textlint_executable = 'foobar'
33   let b:ale_textlint_options = '--something'
34
35   AssertLinter 'foobar',
36   \ ale#Escape('foobar') . ' --something -f json --stdin --stdin-filename %s'
37
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')
40
41   AssertLinter
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'
45
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')
48
49   if has('win32')
50     AssertLinter
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'
54   else
55     AssertLinter
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'
59   endif