mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
Add the typstyle formatter as a fixer for Typst (#4927)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Co-authored-by: Adrian Vollmer <computerfluesterer@protonmail.com>
This commit is contained in:
21
test/fixers/test_typstyle_fixer_callback.vader
Normal file
21
test/fixers/test_typstyle_fixer_callback.vader
Normal file
@@ -0,0 +1,21 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('typst', 'typstyle', 'typstyle')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute(The typstyle callback should return the correct default command):
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('typstyle') . ' '},
|
||||
\ ale#fixers#typstyle#Fix(bufnr(''))
|
||||
|
||||
Execute(The typstyle options should be considered):
|
||||
call ale#test#SetFilename('../test-files/typstyle/testfile.typ')
|
||||
let g:ale_typst_typstyle_options = '-c 100'
|
||||
|
||||
AssertFixer
|
||||
\ { 'command': ale#Escape(g:ale_typst_typstyle_executable)
|
||||
\ . ' -c 100',
|
||||
\ }
|
||||
Reference in New Issue
Block a user