summaryrefslogtreecommitdiff
path: root/test/linter/test_jsonnetfmt.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_jsonnetfmt.vader')
-rw-r--r--test/linter/test_jsonnetfmt.vader19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/linter/test_jsonnetfmt.vader b/test/linter/test_jsonnetfmt.vader
new file mode 100644
index 00000000..d070cd9f
--- /dev/null
+++ b/test/linter/test_jsonnetfmt.vader
@@ -0,0 +1,19 @@
+Before:
+ call ale#assert#SetUpLinterTest('jsonnet', 'jsonnetfmt')
+ call ale#test#SetFilename('../jsonnet_files/testfile.jsonnet')
+
+After:
+ Restore
+
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default jsonnetfmt command should be correct):
+ AssertLinter 'jsonnetfmt',
+ \ ale#Escape('jsonnetfmt') . ' %t'
+
+Execute(jsonnetfmt command and options should be customizable):
+ let g:ale_jsonnet_jsonnetfmt_executable = 'jsonnet'
+ let g:ale_jsonnet_jsonnetfmt_options = 'fmt'
+
+ AssertLinter 'jsonnet',
+ \ ale#Escape('jsonnet') . ' fmt %t'