summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorArash Mousavi <mousavi.arash@gmail.com>2022-05-16 23:38:54 +0100
committerGitHub <noreply@github.com>2022-05-17 07:38:54 +0900
commit3d7b3a654160c41c628097e1aaf8f2af8fb15756 (patch)
treebd886a3f9b41d1205be40a77b3251cbf87343560 /test/fixers
parente343148e80f53073e2d9b2d7a421adec5e06ee66 (diff)
downloadale-3d7b3a654160c41c628097e1aaf8f2af8fb15756.zip
Add zig fmt support (#4198)
* Add zig fmt support * Review changes * Fix linter errors
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_zigfmt_fixer_callback.vader20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/fixers/test_zigfmt_fixer_callback.vader b/test/fixers/test_zigfmt_fixer_callback.vader
new file mode 100644
index 00000000..47e3ddee
--- /dev/null
+++ b/test/fixers/test_zigfmt_fixer_callback.vader
@@ -0,0 +1,20 @@
+Before:
+ call ale#assert#SetUpFixerTest('zig', 'zigfmt')
+
+After:
+ call ale#assert#TearDownFixerTest()
+
+Execute(The zig callback should return the correct default values):
+ AssertFixer {
+ \ 'command': ale#Escape('zig') . ' fmt %t',
+ \ 'read_temporary_file': 1,
+ \}
+
+Execute(The zig callback should allow custom zig executables):
+ let g:ale_zig_zigfmt_executable = 'foo/bar'
+
+ AssertFixer {
+ \ 'command': ale#Escape('foo/bar') . ' fmt %t',
+ \ 'read_temporary_file': 1,
+ \}
+