File: test_buf_format_fixer_callback.vader

package info (click to toggle)
vim-ale 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,408 kB
  • sloc: sh: 497; python: 311; perl: 31; makefile: 4; javascript: 1
file content (21 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Before:
  Save g:ale_proto_buf_format_executable

  " Use an invalid global executable, so we don't match it.
  let g:ale_proto_buf_format_executable = 'xxxinvalid'

  call ale#test#SetDirectory('/testplugin/test/fixers')

After:
  Restore

  call ale#test#RestoreDirectory()

Execute(The buf-format callback should return the correct default values):
  call ale#test#SetFilename('../test-files/proto/testfile.proto')

  AssertEqual
  \ {
  \   'command': ale#Escape('xxxinvalid') . ' format %t',
  \ },
  \ ale#fixers#buf_format#Fix(bufnr(''))