install.fairie/dotfiles/.vim/plugged/ale/test/handler/test_lacheck_handler.vader
Git E2E Dev Test Username e149692cc9 git subrepo clone https://github.com/dense-analysis/ale.git ./dotfiles/.vim/plugged/ale
subrepo:
  subdir:   "dotfiles/.vim/plugged/ale"
  merged:   "e4b205440"
upstream:
  origin:   "https://github.com/dense-analysis/ale.git"
  branch:   "master"
  commit:   "e4b205440"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:09 -04:00

34 lines
889 B
Text

Before:
runtime ale_linters/tex/lacheck.vim
call ale#test#SetDirectory('/testplugin/test/handler')
After:
call ale#linter#Reset()
call ale#test#RestoreDirectory()
Execute(The lacheck handler should parse lines correctly):
call ale#test#SetFilename('../test-files/tex/sample1.tex')
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'type': 'W',
\ 'text': 'perhaps you should insert a `~'' before "\ref"'
\ }
\ ],
\ ale_linters#tex#lacheck#Handle(bufnr(''), [
\ "** sample1:",
\ "\"sample1.tex\", line 1: perhaps you should insert a `~' before \"\\ref\""
\ ])
Execute(The lacheck handler should ignore errors from input files):
call ale#test#SetFilename('ale_test.tex')
AssertEqual
\ [
\ ],
\ ale_linters#tex#lacheck#Handle(255, [
\ "** ale_input:",
\ "\"ale_input.tex\", line 1: perhaps you should insert a `~' before \"\\ref\""
\ ])