summaryrefslogtreecommitdiff
path: root/test/test_csslint_config_detection.vader
blob: a06258ca09cf09cdbb7ad391d10cabd5819f3636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Before:
  silent! cd /testplugin/test
  let g:dir = getcwd()

  runtime ale_linters/css/csslint.vim

After:
  silent execute 'cd ' . g:dir
  unlet! g:dir

  call ale#linter#Reset()

Execute(--config should be set when the .csslintrc file is found):
  new csslint-test-files/some-app/subdir/testfile.js

  AssertEqual
  \ (
  \   'csslint --format=compact '
  \   . '--config=' . fnameescape(g:dir . '/csslint-test-files/some-app/.csslintrc')
  \   . ' %t'
  \ ),
  \ ale_linters#css#csslint#GetCommand(bufnr(''))

  :q

Execute(--config should not be used when no .csslintrc file exists):
  new csslint-test-files/other-app/testfile.css

  AssertEqual
  \ (
  \   'csslint --format=compact '
  \   . ' %t'
  \ ),
  \ ale_linters#css#csslint#GetCommand(bufnr(''))

  :q