diff options
author | w0rp <w0rp@users.noreply.github.com> | 2020-04-18 12:36:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 12:36:16 +0100 |
commit | 64b9a2708d1b5c2ce2c04eee1f64508c75b7bbb4 (patch) | |
tree | ead9219ab546ddbfbdb87e271c5eee0d4a055654 /test | |
parent | 1f9ac1c6dcfcb07d5e992e2117bf186490e9d439 (diff) | |
parent | 00eee550ea5d494172bd83fbbc221aa221c956b9 (diff) | |
download | ale-64b9a2708d1b5c2ce2c04eee1f64508c75b7bbb4.zip |
Merge pull request #3098 from tarikgraba/verilator-columnn
Adds column number to the verilator verilog linter
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_verilator_handler.vader | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/handler/test_verilator_handler.vader b/test/handler/test_verilator_handler.vader new file mode 100644 index 00000000..5e51b5c9 --- /dev/null +++ b/test/handler/test_verilator_handler.vader @@ -0,0 +1,48 @@ +Before: + runtime ale_linters/verilog/verilator.vim + +After: + call ale#linter#Reset() + + +Execute (The verilator handler should parse legacy messages with only line numbers): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected IDENTIFIER' + \ }, + \ { + \ 'lnum': 10, + \ 'type': 'W', + \ 'text': 'Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).' + \ }, + \ ], + \ ale_linters#verilog#verilator#Handle(bufnr(''), [ + \ '%Error: foo_verilator_linted.v:3: syntax error, unexpected IDENTIFIER', + \ '%Warning-BLKSEQ: bar_verilator_linted.v:10: Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).', + \ ]) + + +Execute (The verilator handler should parse new format messages with line and column numbers): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'col' : 1, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected endmodule, expecting ;' + \ }, + \ { + \ 'lnum': 4, + \ 'col' : 6, + \ 'type': 'W', + \ 'text': 'Signal is not used: r' + \ }, + \ ], + \ ale_linters#verilog#verilator#Handle(bufnr(''), [ + \ '%Error: bar_verilator_linted.v:3:1: syntax error, unexpected endmodule, expecting ;', + \ '%Warning-UNUSED: foo_verilator_linted.v:4:6: Signal is not used: r', + \ ]) + |