diff options
Diffstat (limited to 'test/fixers/test_gleam_format_fixer_callback.vader')
-rw-r--r-- | test/fixers/test_gleam_format_fixer_callback.vader | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/fixers/test_gleam_format_fixer_callback.vader b/test/fixers/test_gleam_format_fixer_callback.vader new file mode 100644 index 00000000..2adf9a24 --- /dev/null +++ b/test/fixers/test_gleam_format_fixer_callback.vader @@ -0,0 +1,28 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The gleam_format command should have default values): + call ale#test#SetFilename('../test-files/elixir/testfile.gleam') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('gleam') . ' format %t', + \ }, + \ ale#fixers#gleam_format#Fix(bufnr('')) + +Execute(The gleam_format executable should be configurable): + let g:ale_gleam_format_executable = 'xxxinvalid' + call ale#test#SetFilename('../test-files/elixir/testfile.gleam') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') . ' format %t', + \ }, + \ ale#fixers#gleam_format#Fix(bufnr('')) |