Start of vader tests for puppet root detection
This commit is contained in:
parent
42ae06a288
commit
9ca133feb0
6 changed files with 22 additions and 0 deletions
0
test/puppet-test-files/new-style-module/metadata.json
Normal file
0
test/puppet-test-files/new-style-module/metadata.json
Normal file
22
test/test_puppet_path_detection.vader
Normal file
22
test/test_puppet_path_detection.vader
Normal file
|
@ -0,0 +1,22 @@
|
|||
Before:
|
||||
call ale#test#SetDirectory('/testplugin/test')
|
||||
|
||||
runtime ale_linters/puppet/languageserver.vim
|
||||
|
||||
After:
|
||||
call ale#test#RestoreDirectory()
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(old-style module should find its root correctly):
|
||||
call ale#test#SetFilename('puppet-test-files/old-style-module/manifests/init.pp')
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#Simplify(g:dir . '/puppet-test-files/old-style-module'),
|
||||
\ ale_linters#puppet#languageserver#GetProjectRoot(bufnr(''))
|
||||
|
||||
Execute(new-style module should find its root correctly):
|
||||
call ale#test#SetFilename('puppet-test-files/new-style-module/lib/puppet/types/exampletype.rb')
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#Simplify(g:dir . '/puppet-test-files/new-style-module'),
|
||||
\ ale_linters#puppet#languageserver#GetProjectRoot(bufnr(''))
|
Reference in a new issue