Add raco_fmt fixer for Racket files (#4354)

* Add raco_fmt fixer for Racket files

* Fix command and add test

* Fix quoting
This commit is contained in:
Jeremy Cantrell
2022-11-07 07:20:25 -06:00
committed by GitHub
parent edffffac25
commit 4b433e5693
5 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
Before:
call ale#assert#SetUpFixerTest('racket', 'raco_fmt')
After:
call ale#assert#TearDownFixerTest()
Execute(The raco_fmt callback should return the correct default values):
call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt')
AssertFixer {'command': ale#Escape('raco') . ' fmt'}
Execute(The raco_fmt callback should include custom raco_fmt options):
let g:ale_racket_raco_fmt_options = "--width 100"
call ale#test#SetFilename('../test-files/racket/simple-script/foo.rkt')
AssertFixer {'command': ale#Escape('raco') . ' fmt ' . g:ale_racket_raco_fmt_options}