fix-proselint (#5074)

This commit is contained in:
PsickOSSH
2026-01-25 08:29:03 +01:00
committed by GitHub
parent c0dd8167a6
commit d59cb7b3c2
17 changed files with 129 additions and 31 deletions

View File

@@ -0,0 +1,28 @@
Before:
runtime autoload/ale/proselint.vim
let b:ale_proselint_executable = 'proselint'
After:
unlet! b:ale_proselint_executable
Execute(Command for proselint >= 0.16.0 should use 'check'):
AssertEqual
\ ale#Escape('proselint') . ' check %t',
\ ale#proselint#GetCommand(bufnr(''), [0, 16, 0])
AssertEqual
\ ale#Escape('proselint') . ' check %t',
\ ale#proselint#GetCommand(bufnr(''), [0, 17, 0])
Execute(Command for proselint < 0.16.0 should use standard arguments):
AssertEqual
\ ale#Escape('proselint') . ' %t',
\ ale#proselint#GetCommand(bufnr(''), [0, 15, 0])
Execute(Command should respect custom executable path):
let b:ale_proselint_executable = '/custom/path/to/proselint'
AssertEqual
\ ale#Escape('/custom/path/to/proselint') . ' check %t',
\ ale#proselint#GetCommand(bufnr(''), [0, 16, 0])

View File

@@ -0,0 +1,17 @@
Before:
Save g:ale_proselint_executable
runtime autoload/ale/proselint.vim
After:
Restore
Execute(Default executable should be detected correctly):
AssertEqual
\ 'proselint',
\ ale#proselint#GetExecutable(bufnr(''))
Execute(User specified executable should override default):
let g:ale_proselint_executable = '/path/to/proselint-bin'
AssertEqual
\ '/path/to/proselint-bin',
\ ale#proselint#GetExecutable(bufnr(''))