Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanson committed Feb 22, 2024
1 parent dd737ea commit ea0e408
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions test/linter/test_cspell.vader
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Execute(The global executable should be used when the local one cannot be found)
AssertLinter
\ 'cspell',
\ ale#Escape('cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="tex" -- stdin'
\ . ' lint --no-color --no-progress --no-summary --language-id="latex" -- stdin'

Execute(Should use the node_modules/.bin executable if available):
call ale#test#SetFilename('../test-files/cspell/node-modules/test.tex')
Expand All @@ -39,7 +39,7 @@ Execute(Should use the node_modules/.bin executable if available):
\ . '/../test-files/cspell/node-modules/node_modules/.bin/cspell'),
\ ale#Escape(ale#path#Simplify(g:dir
\ . '/../test-files/cspell/node-modules/node_modules/.bin/cspell'))
\ . ' lint --no-color --no-progress --no-summary --language-id="tex" -- stdin'
\ . ' lint --no-color --no-progress --no-summary --language-id="latex" -- stdin'

Execute(Should use the node_modules/cspell executable if available):
call ale#test#SetFilename('../test-files/cspell/node-modules-2/test.tex')
Expand All @@ -50,7 +50,7 @@ Execute(Should use the node_modules/cspell executable if available):
\ (has('win32') ? 'node.exe ': '')
\ . ale#Escape(ale#path#Simplify(g:dir
\ . '/../test-files/cspell/node-modules-2/node_modules/cspell/bin.js'))
\ . ' lint --no-color --no-progress --no-summary --language-id="tex" -- stdin'
\ . ' lint --no-color --no-progress --no-summary --language-id="latex" -- stdin'

Execute(Should let users configure a global executable and override local paths):
let g:ale_cspell_executable = '/path/to/custom/cspell'
Expand All @@ -59,7 +59,7 @@ Execute(Should let users configure a global executable and override local paths)
AssertLinter
\ '/path/to/custom/cspell',
\ ale#Escape('/path/to/custom/cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="tex" -- stdin'
\ . ' lint --no-color --no-progress --no-summary --language-id="latex" -- stdin'

Execute(Additional cspell options should be configurable):
call ale#test#SetFilename('../test-files/dummy')
Expand All @@ -69,7 +69,37 @@ Execute(Additional cspell options should be configurable):
AssertLinter
\ 'cspell',
\ ale#Escape('cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="tex" --foobar -- stdin'
\ . ' lint --no-color --no-progress --no-summary --language-id="latex" --foobar -- stdin'

Execute(The language id should be tex when filetype is plaintex):
set filetype=plaintex

AssertLinter
\ 'cspell',
\ ale#Escape('cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="tex" -- stdin'

Execute(The language id should be equal to filetype when not tex or plaintex):
set filetype=markdown

AssertLinter
\ 'cspell',
\ ale#Escape('cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="markdown" -- stdin'

set filetype=asciidoc

AssertLinter
\ 'cspell',
\ ale#Escape('cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="asciidoc" -- stdin'

set filetype=html

AssertLinter
\ 'cspell',
\ ale#Escape('cspell')
\ . ' lint --no-color --no-progress --no-summary --language-id="html" -- stdin'

Execute(The language id should not specified when filetype is empty):
set filetype=
Expand Down

0 comments on commit ea0e408

Please sign in to comment.