summaryrefslogtreecommitdiff
path: root/test/fixers/test_zigfmt_fixer_callback.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixers/test_zigfmt_fixer_callback.vader')
-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,
+ \}
+