summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_jq_command_callback.vader8
-rw-r--r--test/test_jq_linter.vader18
2 files changed, 26 insertions, 0 deletions
diff --git a/test/command_callback/test_jq_command_callback.vader b/test/command_callback/test_jq_command_callback.vader
new file mode 100644
index 00000000..20c3db5b
--- /dev/null
+++ b/test/command_callback/test_jq_command_callback.vader
@@ -0,0 +1,8 @@
+Before:
+ call ale#assert#SetUpLinterTest('json', 'jq')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default command should be correct):
+ AssertLinter 'jq', ale#Escape('jq')
diff --git a/test/test_jq_linter.vader b/test/test_jq_linter.vader
new file mode 100644
index 00000000..cbe23b96
--- /dev/null
+++ b/test/test_jq_linter.vader
@@ -0,0 +1,18 @@
+Before:
+ runtime ale_linters/json/jq.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute (Should parse error correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 1,
+ \ 'col': 9,
+ \ 'text': 'Expected another array element',
+ \ }
+ \ ],
+ \ ale_linters#json#jq#Handle(0, [
+ \ 'parse error: Expected another array element at line 1, column 9'
+ \ ])