2019-04-08 15:25:30 +00:00
|
|
|
Before:
|
|
|
|
call ale#test#SetDirectory('/testplugin/test')
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#test#RestoreDirectory()
|
|
|
|
|
|
|
|
Execute(Detect root of Swift project with Package.swift correctly):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/swift/swift-package-project/src/folder/dummy.swift')
|
2019-04-08 15:25:30 +00:00
|
|
|
AssertEqual
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/test-files/swift/swift-package-project'),
|
2019-04-08 15:25:30 +00:00
|
|
|
\ ale#swift#FindProjectRoot(bufnr(''))
|
|
|
|
|
|
|
|
Execute(Detect no root in case of non-Package.swift project):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/swift/non-swift-package-project/src/folder/dummy.swift')
|
2019-04-08 15:25:30 +00:00
|
|
|
AssertEqual
|
|
|
|
\ '',
|
|
|
|
\ ale#swift#FindProjectRoot(bufnr(''))
|
|
|
|
|