summaryrefslogtreecommitdiff
path: root/test/handler/test_starknet_handler.vader
blob: 767cb211d83292f8dab1048cae2e20245d248eb6 (plain)
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
Before:
  runtime ale_linters/cairo/starknet.vim

After:
  call ale#linter#Reset()

Execute(The starknet handler should handle error messages correctly):
  AssertEqual
  \ [
  \   {
  \     'lnum': 3,
  \     'col': 6,
  \     'text': 'Could not find module "starkware.cairo.commo.cairo_builtins". Searched in the following paths:',
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#cairo#starknet#Handle(bufnr(''), [
  \   'contract.cairo:3:6: Could not find module "starkware.cairo.commo.cairo_builtins". Searched in the following paths:',
  \   'from starkware.cairo.commo.cairo_builtins import HashBuiltin',
  \   '     ^**********************************^',
  \ ])

  AssertEqual
  \ [
  \   {
  \     'lnum': 21,
  \     'col': 2,
  \     'text': 'Unsupported decorator: "vie".',
  \     'type': 'E',
  \   },
  \ ],
  \ ale_linters#cairo#starknet#Handle(bufnr(''), [
  \   'contract.cairo:21:2: Unsupported decorator: "vie".',
  \   '@vie',
  \   ' ^*^',
  \ ])