Support 'gleam format' as Gleam fixer (#4710)

This commit is contained in:
Jonathan Palardy authored and GitHub committed 2024-02-06 10:16:25 +09:00
1 parent 8922478a83
commit 1b24bd3f5f
8 files changed
+65 -3

No files matched your search

@@ -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(''))