]> git.madduck.net Git - etc/vim.git/blob - test/fixers/test_textlint_fixer_callback.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:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / fixers / test_textlint_fixer_callback.vader
1 Before:
2   Save g:ale_textlint_executable
3   Save g:ale_textlint_options
4   Save g:ale_textlint_use_global
5
6   " Use an invalid global executable, so we don't match it.
7   let g:ale_textlint_executable = 'xxxinvalid'
8   let g:ale_textlint_options = ''
9   let g:ale_textlint_use_global = 0
10
11   call ale#test#SetDirectory('/testplugin/test/fixers')
12
13 After:
14   Restore
15
16   call ale#test#RestoreDirectory()
17
18 Execute(The textlint callback should return the correct default values):
19   call ale#test#SetFilename('../test-files/markdown/testfile.md')
20
21   AssertEqual
22   \ {
23   \   'read_temporary_file': 1,
24   \   'command': ale#Escape('xxxinvalid')
25   \     . ' --fix'
26   \     . ' %t',
27   \ },
28   \ ale#fixers#textlint#Fix(bufnr(''))
29
30 Execute(The textlint callback should include custom textlint options):
31   let g:ale_textlint_options = "--quiet"
32   call ale#test#SetFilename('../test-files/markdown/testfile.md')
33
34   AssertEqual
35   \ {
36   \   'read_temporary_file': 1,
37   \   'command': ale#Escape('xxxinvalid')
38   \     . ' --fix'
39   \     . ' ' . g:ale_textlint_options
40   \     . ' %t',
41   \ },
42   \ ale#fixers#textlint#Fix(bufnr(''))