install.fairie/dotfiles/.vim/plugged/ale/test/handler/test_llc_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

58 lines
1.5 KiB
Text

Before:
runtime! ale_linters/llvm/llc.vim
After:
call ale#linter#Reset()
Execute(llc handler should parse errors output for STDIN):
AssertEqual
\ [
\ {
\ 'lnum': 10,
\ 'col': 7,
\ 'text': "error: value doesn't match function result type 'i32'",
\ 'type': 'E',
\ },
\ {
\ 'lnum': 10,
\ 'col': 13,
\ 'text': "error: use of undefined value '@foo'",
\ 'type': 'E',
\ },
\ ],
\ ale_linters#llvm#llc#HandleErrors(bufnr(''), [
\ "llc: <stdin>:10:7: error: value doesn't match function result type 'i32'",
\ 'ret i64 0',
\ ' ^',
\ '',
\ "llc: <stdin>:10:13: error: use of undefined value '@foo'",
\ 'call void @foo(i64 %0)',
\ ' ^',
\ ])
Execute(llc handler should parse errors output for some file):
call ale#test#SetFilename('test.ll')
AssertEqual
\ [
\ {
\ 'lnum': 10,
\ 'col': 7,
\ 'text': "error: value doesn't match function result type 'i32'",
\ 'type': 'E',
\ },
\ {
\ 'lnum': 10,
\ 'col': 13,
\ 'text': "error: use of undefined value '@foo'",
\ 'type': 'E',
\ },
\ ],
\ ale_linters#llvm#llc#HandleErrors(bufnr(''), [
\ "llc: /path/to/test.ll:10:7: error: value doesn't match function result type 'i32'",
\ 'ret i64 0',
\ ' ^',
\ '',
\ "llc: /path/to/test.ll:10:13: error: use of undefined value '@foo'",
\ 'call void @foo(i64 %0)',
\ ' ^',
\ ])