summaryrefslogtreecommitdiff
path: root/test/linter/test_jsonnetfmt.vader
diff options
context:
space:
mode:
authorTrevor Whitney <trevorjwhitney@gmail.com>2021-09-20 19:49:15 -0600
committerGitHub <noreply@github.com>2021-09-21 10:49:15 +0900
commitf8a4c78b5b293d11da9075373c9de0bb5afdeffe (patch)
treedd04aca1ee0b8f8cb5c91c0aac5172f8de607f07 /test/linter/test_jsonnetfmt.vader
parent2f72a3ed1972d23a5ef50c78715ec68f090932e8 (diff)
downloadale-f8a4c78b5b293d11da9075373c9de0bb5afdeffe.zip
Add support for jsonnetfmt and jsonnet-lint (#3907)
* update to lates Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * fix up docs Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * fix docs Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * get tests passing Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * update regex Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * use ale#Pad and AssertFixer Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
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'