summaryrefslogtreecommitdiff
path: root/test/handler/test_llvm_mc_handler.vader
diff options
context:
space:
mode:
authorjavad <uidopsu@gmail.com>2023-02-09 05:19:24 +0330
committerGitHub <noreply@github.com>2023-02-09 10:49:24 +0900
commitf78e9d634f9c1177031d4bdeda93f98d63b6bc12 (patch)
tree6e3eaab73797ff565994d6ef6435454d31e02565 /test/handler/test_llvm_mc_handler.vader
parentae2d47ba831043e34fcd9547c41a76a4800992b8 (diff)
downloadale-f78e9d634f9c1177031d4bdeda93f98d63b6bc12.zip
Add support for llvm-mc as an assembly linter (#4446)
Diffstat (limited to 'test/handler/test_llvm_mc_handler.vader')
-rw-r--r--test/handler/test_llvm_mc_handler.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/handler/test_llvm_mc_handler.vader b/test/handler/test_llvm_mc_handler.vader
new file mode 100644
index 00000000..e38ca304
--- /dev/null
+++ b/test/handler/test_llvm_mc_handler.vader
@@ -0,0 +1,28 @@
+Before:
+ runtime ale_linters/asm/llvm_mc.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The asm llvm-mc handler should parse lines correctly):
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 10,
+ \ 'col' : 15,
+ \ 'text': "invalid operand for instruction",
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 11,
+ \ 'col' : 2,
+ \ 'text': "invalid instruction mnemonic 'lpaq'",
+ \ 'type': 'E',
+ \ },
+ \ ],
+ \ ale_linters#asm#llvm_mc#Handle(357, [
+ \ "xorq %rbp, %rbp",
+ \ "{standard_input}:10:15: error: invalid operand for instruction",
+ \ "{standard input}:11:2: error: invalid instruction mnemonic 'lpaq'",
+ \ ])