summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/elixir-test-files/testfile.ex0
-rw-r--r--test/fixers/test_mix_format_fixer_callback.vader20
2 files changed, 20 insertions, 0 deletions
diff --git a/test/elixir-test-files/testfile.ex b/test/elixir-test-files/testfile.ex
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/elixir-test-files/testfile.ex
diff --git a/test/fixers/test_mix_format_fixer_callback.vader b/test/fixers/test_mix_format_fixer_callback.vader
new file mode 100644
index 00000000..c6c97c57
--- /dev/null
+++ b/test/fixers/test_mix_format_fixer_callback.vader
@@ -0,0 +1,20 @@
+Before:
+ call ale#test#SetDirectory('/testplugin/test/fixers')
+ Save g:ale_elixir_mix_executable
+
+ let g:ale_elixir_mix_executable = 'xxxinvalid'
+
+After:
+ call ale#test#RestoreDirectory()
+
+Execute(The mix_format callback should return the correct default values):
+ call ale#test#SetFilename('../elixir-test-files/testfile.ex')
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape('xxxinvalid')
+ \ . ' format %t',
+ \ },
+ \ ale#fixers#mix_format#Fix(bufnr(''))
+