diff options
author | Cluas <Cluas@live.cn> | 2019-09-13 05:48:27 +0800 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-09-12 22:48:27 +0100 |
commit | a6c59faa0f4b7f6226859c1a9b5bae83b1aef295 (patch) | |
tree | a857dcdd533ef25b14189908bdac780363e17cca /test/fixers/test_sqlformat_fixer_callback.vader | |
parent | 3e8c8d3ccbead8a6540b782686ab3751361a4ec1 (diff) | |
download | ale-a6c59faa0f4b7f6226859c1a9b5bae83b1aef295.zip |
feat: support sqlformat. (#2702)
* feat: support sqlformat.
Diffstat (limited to 'test/fixers/test_sqlformat_fixer_callback.vader')
-rw-r--r-- | test/fixers/test_sqlformat_fixer_callback.vader | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/fixers/test_sqlformat_fixer_callback.vader b/test/fixers/test_sqlformat_fixer_callback.vader new file mode 100644 index 00000000..4bace089 --- /dev/null +++ b/test/fixers/test_sqlformat_fixer_callback.vader @@ -0,0 +1,24 @@ +Before: + Save g:ale_sql_sqlformat_executable + Save g:ale_sql_sqlformat_options + +After: + Restore + +Execute(The sqlformat callback should return the correct default values): + AssertEqual + \ { + \ 'command': ale#Escape('sqlformat') . ' -' + \ }, + \ ale#fixers#sqlformat#Fix(bufnr('')) + +Execute(The sqlformat executable and options should be configurable): + let g:ale_sql_sqlformat_executable = '/path/to/sqlformat' + let g:ale_sql_sqlformat_options = '-a' + + AssertEqual + \ { + \ 'command': ale#Escape('/path/to/sqlformat') + \ . ' -a -' + \ }, + \ ale#fixers#sqlformat#Fix(bufnr('')) |