summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBùi Thành Nhân <hi@imnhan.com>2019-11-09 15:34:15 +0700
committerBùi Thành Nhân <hi@imnhan.com>2019-11-09 16:28:49 +0700
commitabad8e474bf3f096dc96eb4020ab52d35908725d (patch)
treea858ea2a4152b121cfb0ca784d154b1d92cfa065 /test
parentdb6b1b5ecc17558f87f55b159f90ebf36677b6b3 (diff)
downloadale-abad8e474bf3f096dc96eb4020ab52d35908725d.zip
add nimpretty fixer
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_nimpretty_fixer_callback.vader27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/fixers/test_nimpretty_fixer_callback.vader b/test/fixers/test_nimpretty_fixer_callback.vader
new file mode 100644
index 00000000..b05139f0
--- /dev/null
+++ b/test/fixers/test_nimpretty_fixer_callback.vader
@@ -0,0 +1,27 @@
+Before:
+ call ale#assert#SetUpFixerTest('nim', 'nimpretty')
+
+After:
+ call ale#test#RestoreDirectory()
+
+Execute(The nimpretty callback should return the correct default values):
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape(g:ale_nim_nimpretty_executable)
+ \ . ' %t --maxLineLen:80'
+ \ },
+ \ ale#fixers#nimpretty#Fix(bufnr(''))
+
+Execute(The nimpretty callback should include any additional options):
+ let g:ale_nim_nimpretty_options = '--some-option'
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape(g:ale_nim_nimpretty_executable)
+ \ . ' %t'
+ \ . ' --some-option',
+ \ },
+ \ ale#fixers#nimpretty#Fix(bufnr(''))