2018-07-05 19:17:14 +00:00
|
|
|
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):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/puppet/old-style-module/manifests/init.pp')
|
2018-07-05 19:17:14 +00:00
|
|
|
|
|
|
|
AssertEqual
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/test-files/puppet/old-style-module'),
|
2018-07-05 19:17:14 +00:00
|
|
|
\ ale_linters#puppet#languageserver#GetProjectRoot(bufnr(''))
|
|
|
|
|
|
|
|
Execute(new-style module should find its root correctly):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/puppet/new-style-module/lib/puppet/types/exampletype.rb')
|
2018-07-05 19:17:14 +00:00
|
|
|
|
|
|
|
AssertEqual
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/test-files/puppet/new-style-module'),
|
2018-07-05 19:17:14 +00:00
|
|
|
\ ale_linters#puppet#languageserver#GetProjectRoot(bufnr(''))
|