summaryrefslogtreecommitdiff
path: root/test/handler/test_ktlint_handler.vader
blob: f0d634e622331200cdf6bb964f57c15c7269c2c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Before:
  Save g:ale_kotlin_ktlint_rulesets

  let g:ale_kotlin_ktlint_rulesets = []

After:
  Restore

Execute(The ktlint handler method GetRulesets should properly parse custom rulesets):
  let g:ale_kotlin_ktlint_rulesets = ['/path/to/custom/ruleset.jar', '/path/to/other/ruleset.jar']

  AssertEqual
  \ '--ruleset /path/to/custom/ruleset.jar --ruleset /path/to/other/ruleset.jar',
  \ ale#handlers#ktlint#GetRulesets(bufnr(''))

Execute(The ktlint handler method GetRulesets should return an empty string when no rulesets have been configured):
  let g:ale_kotlin_ktlint_rulesets = []

  AssertEqual
  \ '',
  \ ale#handlers#ktlint#GetRulesets(bufnr(''))