File: test_remark_lint.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (37 lines) | stat: -rw-r--r-- 1,351 bytes parent folder | download | duplicates (2)
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
37
Before:
  " This is just one language for the linter.
  call ale#assert#SetUpLinterTest('markdown', 'remark_lint')

After:
  call ale#assert#TearDownLinterTest()

Execute(The default command should be correct):
  AssertLinter 'remark',
  \ ale#Escape('remark') . ' --no-stdout --no-color'

Execute(The executable should be configurable):
  let b:ale_markdown_remark_lint_executable = 'foobar'

  AssertLinter 'foobar',
  \ ale#Escape('foobar') . ' --no-stdout --no-color'

Execute(The options should be configurable):
  let b:ale_markdown_remark_lint_options = '--something'

  AssertLinter 'remark',
  \ ale#Escape('remark') . ' --something --no-stdout --no-color'

Execute(The local executable from .bin should be used if available):
  call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md')

  AssertLinter
  \ ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark'),
  \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/remark_lint/with_bin_path/node_modules/.bin/remark'))
  \   . ' --no-stdout --no-color'

Execute(The global executable should be used if the option is set):
  let b:ale_markdown_remark_lint_use_global = 1
  call ale#test#SetFilename('../test-files/remark_lint/with_bin_path/foo.md')

  AssertLinter 'remark', ale#Escape('remark')
  \   . ' --no-stdout --no-color'