diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-09-09 11:55:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-09 11:55:42 +0100 |
commit | 0948dcc435201f0ea62a22c53ce31971a75cba35 (patch) | |
tree | b63ae0f4a50b62703823b56bf63987747046748e /test/fixers | |
parent | 395aba19c37a4bc4ead34f115381227d7b71bc0a (diff) | |
parent | a97ef49c5174f5d60f2dc68718d96965361f3d4e (diff) | |
download | ale-0948dcc435201f0ea62a22c53ce31971a75cba35.zip |
Merge pull request #1897 from LEI/add-sqlfmt-fixer
Add support for sqlfmt
Diffstat (limited to 'test/fixers')
-rw-r--r-- | test/fixers/test_sqlfmt_fixer_callback.vader | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/fixers/test_sqlfmt_fixer_callback.vader b/test/fixers/test_sqlfmt_fixer_callback.vader new file mode 100644 index 00000000..3046edb3 --- /dev/null +++ b/test/fixers/test_sqlfmt_fixer_callback.vader @@ -0,0 +1,26 @@ +Before: + Save g:ale_sql_sqlfmt_executable + Save g:ale_sql_sqlfmt_options + +After: + Restore + +Execute(The sqlfmt callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('sqlfmt') + \ . ' -w', + \ }, + \ ale#fixers#sqlfmt#Fix(bufnr('')) + +Execute(The sqlfmt executable and options should be configurable): + let g:ale_sql_sqlfmt_executable = '/path/to/sqlfmt' + let g:ale_sql_sqlfmt_options = '-u' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/sqlfmt') + \ . ' -w' + \ . ' -u', + \ }, + \ ale#fixers#sqlfmt#Fix(bufnr('')) |