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

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / ale / test / fixers / test_ptop_fixer_callback.vader
1 Before:
2   Save g:ale_pascal_ptop_executable
3   Save g:ale_pascal_ptop_options
4
5   " Use an invalid global executable, so we don't match it.
6   let g:ale_pascal_ptop_executable = 'xxxinvalid'
7   let g:ale_pascal_ptop_options = ''
8
9   call ale#test#SetDirectory('/testplugin/test/fixers')
10
11 After:
12   Restore
13
14   call ale#test#RestoreDirectory()
15
16 Execute(The ptop callback should return the correct default values):
17   call ale#test#SetFilename('../test-files/pascal/test.pas')
18
19   AssertEqual
20   \ {
21   \   'read_temporary_file': 1,
22   \   'command': ale#Escape('xxxinvalid')
23   \     . ' %s %t',
24   \ },
25   \ ale#fixers#ptop#Fix(bufnr(''))
26
27 Execute(The ptop callback should include custom ptop options):
28   let g:ale_pascal_ptop_options = "-i 2"
29   call ale#test#SetFilename('../test-files/pascal/test.pas')
30
31   AssertEqual
32   \ {
33   \   'read_temporary_file': 1,
34   \   'command': ale#Escape('xxxinvalid')
35   \     . ' ' . g:ale_pascal_ptop_options
36   \     . ' %s %t',
37   \ },
38   \ ale#fixers#ptop#Fix(bufnr(''))