summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorAlvinRolling <alvinrolling@gmail.com>2024-02-22 10:18:04 +0800
committerGitHub <noreply@github.com>2024-02-22 11:18:04 +0900
commit52c6146751cda840fc6df66efe6a7c4ab3409223 (patch)
treece57710737dddc60bf99ac08a2a2c1acda89d044 /test/handler
parent1c5b84f375a5d0ea4eb11d64b333119245ec5605 (diff)
downloadale-52c6146751cda840fc6df66efe6a7c4ab3409223.zip
Slang linter for Verilog. (#4713)
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_slang_handler.vader26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/handler/test_slang_handler.vader b/test/handler/test_slang_handler.vader
new file mode 100644
index 00000000..529eb718
--- /dev/null
+++ b/test/handler/test_slang_handler.vader
@@ -0,0 +1,26 @@
+Before:
+ runtime ale_linters/verilog/slang.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The slang handler should parse lines correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 11,
+ \ 'col': 1,
+ \ 'type': 'W',
+ \ 'text': 'extra '';'' has no effect [-Wempty-member]',
+ \ },
+ \ {
+ \ 'lnum': 24,
+ \ 'col': 12,
+ \ 'type': 'E',
+ \ 'text': 'cannot mix continuous and procedural assignments to variable ''data_o''',
+ \ },
+ \ ],
+ \ ale_linters#verilog#slang#Handle(bufnr(''), [
+ \ 'foo.sv:11:1: warning: extra '';'' has no effect [-Wempty-member]',
+ \ 'foo.sv:24:12: error: cannot mix continuous and procedural assignments to variable ''data_o''',
+ \ ])