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

23 lines
802 B
Text

Before:
runtime ale_linters/wgsl/naga.vim
After:
call ale#linter#Reset()
Execute(Error handler should parse error message and position from input):
let example_output = [
\ "error: expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['",
\ " ┌─ wgsl:5:1",
\ " │",
\ "5 │ [[group(1), binding(0)]]",
\ " │ ^ expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file",
\ "Could not parse WGSL",
\ ]
let actual = ale#handlers#naga#Handle(0, example_output)
let expected = [{
\ "text": "expected global item ('struct', 'let', 'var', 'type', ';', 'fn') or the end of the file, found '['",
\ "lnum": 5,
\ "col": 1,
\ "type": "E",
\ }]
AssertEqual actual, expected