File: test_dmd_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 (41 lines) | stat: -rw-r--r-- 1,298 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Before:
  runtime ale_linters/d/dmd.vim
  call ale#test#SetDirectory('/testplugin/test/dmd')
  call ale#test#SetFilename('test.d')

After:
  call ale#linter#Reset()
  call ale#test#RestoreDirectory()

Execute(Basic errors should be handled by dmd):
  AssertEqual
  \ [
  \   {
  \     'filename': ale#path#Simplify(g:dir . '/test.d'),
  \     'lnum': '5',
  \     'col' : '8',
  \     'type': 'E',
  \     'text': 'module weak_reference is in file ''dstruct/weak_reference.d'' which cannot be read'
  \   },
  \   {
  \     'filename': ale#path#Simplify(g:dir . '/test.d'),
  \     'lnum': '20',
  \     'col' : '10',
  \     'type': 'W',
  \     'text': 'function test.thisoldfunc is deprecated'
  \   },
  \   {
  \     'filename': ale#path#Simplify(g:dir . '/foo.d'),
  \     'lnum': '230',
  \     'col' : '9',
  \     'type': 'W',
  \     'text': 'statement is not reachable'
  \   }
  \ ],
  \ ale_linters#d#dmd#Handle(bufnr(''), [
  \ 'test.d(5,8): Error: module weak_reference is in file ''dstruct/weak_reference.d'' which cannot be read',
  \ 'import path[0] = source',
  \ 'import path[1] = /usr/include/dlang/dmd',
  \ ale#path#Simplify(g:dir . '/test.d') . '(20,10): Deprecation: function test.thisoldfunc is deprecated',
  \ 'foo.d(230,9): Warning: statement is not reachable',
  \ ])