diff options
author | Nathan Sharp <39231199+nwsharp@users.noreply.github.com> | 2021-07-12 06:39:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 21:39:53 +0900 |
commit | c8f669249ae064aa014ec180df3934f0a82cab29 (patch) | |
tree | 3ba9d4e7e7d25cfddde068b4b868a5cde2da8ce5 /test | |
parent | 9a9fd24b17db32e452609e68e6a9729461625720 (diff) | |
download | ale-c8f669249ae064aa014ec180df3934f0a82cab29.zip |
Add Yosys linter for Verilog files. (#3713)
* Add yosys for verilog files.
* Add handler test for yosys.
* fix typo in yosys handler test
* fix array order in yosys handler test
* add yosys linter to filetype defaults test
* fix duplicate tag
* add 'yosys' to 'ale-supported-languages-and-tools.txt'
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_yosys_handler.vader | 27 | ||||
-rw-r--r-- | test/test_filetype_linter_defaults.vader | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/test/handler/test_yosys_handler.vader b/test/handler/test_yosys_handler.vader new file mode 100644 index 00000000..a55d0b5b --- /dev/null +++ b/test/handler/test_yosys_handler.vader @@ -0,0 +1,27 @@ +Before: + runtime ale_linters/verilog/yosys.vim + +After: + call ale#linter#Reset() + +Execute(The yosys handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected TOK_ID', + \ 'filename': 'file.v' + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'internal error', + \ }, + \ ], + \ ale_linters#verilog#yosys#Handle(bufnr(''), [ + \ '1. Executing Verilog-2005 frontend: file.v', + \ 'ERROR: internal error', + \ 'file.v:3: ERROR: syntax error, unexpected TOK_ID', + \ ]) + diff --git a/test/test_filetype_linter_defaults.vader b/test/test_filetype_linter_defaults.vader index 419800de..563a093f 100644 --- a/test/test_filetype_linter_defaults.vader +++ b/test/test_filetype_linter_defaults.vader @@ -61,7 +61,7 @@ Execute(The defaults for the zsh filetype should be correct): Execute(The defaults for the verilog filetype should be correct): " This filetype isn't configured with default, so we can test loading all " available linters with this. - AssertEqual ['hdl-checker', 'iverilog', 'verilator', 'vlog', 'xvlog'], GetLinterNames('verilog') + AssertEqual ['hdl-checker', 'iverilog', 'verilator', 'vlog', 'xvlog', 'yosys'], GetLinterNames('verilog') let g:ale_linters_explicit = 1 |