diff options
author | Alex McKinney <alexmckinney01@gmail.com> | 2022-04-06 01:00:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 17:00:59 +0900 |
commit | 607f33a1b0f662d9809d54363e8e81a4965862ce (patch) | |
tree | 4795d8a2dd649f930202b93e25dadf4bd6f8402a /test/fixers/test_buf_format_fixer_callback.vader | |
parent | 1e997580fdbb8e11e043af071c97d3aa879cf875 (diff) | |
download | ale-607f33a1b0f662d9809d54363e8e81a4965862ce.zip |
Add buf linter and fixer (#4128)
* Add buf lint to linters
* Add buf format to fixers
* Fix test/linter/test_buf_lint.vader
* Fix test/fixers/test_buf_format_fixer_callback.vader
* Simplify test/test-files/proto/testfile.proto
* Add buf-lint alias and rename linter
Diffstat (limited to 'test/fixers/test_buf_format_fixer_callback.vader')
-rw-r--r-- | test/fixers/test_buf_format_fixer_callback.vader | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/fixers/test_buf_format_fixer_callback.vader b/test/fixers/test_buf_format_fixer_callback.vader new file mode 100644 index 00000000..ee484820 --- /dev/null +++ b/test/fixers/test_buf_format_fixer_callback.vader @@ -0,0 +1,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('')) |