File: test_sqlformat_fixer_callback.vader

package info (click to toggle)
vim-ale 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,408 kB
  • sloc: sh: 497; python: 311; perl: 31; makefile: 4; javascript: 1
file content (24 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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(''))