File: test_naga_handler.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (23 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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