From f7852dbd0a063d6d82ee17a5057fea53cb79b21d Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 21 Mar 2021 00:21:49 +0000 Subject: #3633 - Move linter tests into test/linter --- test/linter/test_texlab.vader | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/linter/test_texlab.vader (limited to 'test/linter/test_texlab.vader') diff --git a/test/linter/test_texlab.vader b/test/linter/test_texlab.vader new file mode 100644 index 00000000..75fc2f25 --- /dev/null +++ b/test/linter/test_texlab.vader @@ -0,0 +1,30 @@ +Before: + call ale#assert#SetUpLinterTest('tex', 'texlab') + + Save &filetype + let &filetype = 'tex' + +After: + call ale#assert#TearDownLinterTest() + +Execute(The language string should be correct): + AssertLSPLanguage 'tex' + +Execute(The default executable path should be correct): + AssertLinter 'texlab', ale#Escape('texlab') + +Execute(The project root should be detected correctly): + call ale#test#SetFilename('../test-files/tex/sample1.tex') + silent! call mkdir('../test-files/tex/.git') + + AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/tex') + +Execute(The executable should be configurable): + let b:ale_tex_texlab_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The options should be configurable): + let b:ale_tex_texlab_options = '-v' + + AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options -- cgit v1.2.3