diff options
author | w0rp <devw0rp@gmail.com> | 2019-01-12 13:14:25 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-01-12 13:14:29 +0000 |
commit | cbaa7eb3c7608d660b372305f1c7bad248ab7432 (patch) | |
tree | e0181c9378a8cc76961c4bf73fe4b36aa74e8131 /test | |
parent | 6644563949299ce60aadf338103d50315a034a6a (diff) | |
download | ale-cbaa7eb3c7608d660b372305f1c7bad248ab7432.zip |
Clean up bingo tests, so they pass on my machine too
Diffstat (limited to 'test')
-rw-r--r-- | test/command_callback/test_bingo_command_callback.vader | 15 | ||||
-rw-r--r-- | test/test_bingo_find_project_root.vader | 21 |
2 files changed, 15 insertions, 21 deletions
diff --git a/test/command_callback/test_bingo_command_callback.vader b/test/command_callback/test_bingo_command_callback.vader index fa343bfe..f4cb3231 100644 --- a/test/command_callback/test_bingo_command_callback.vader +++ b/test/command_callback/test_bingo_command_callback.vader @@ -4,6 +4,10 @@ Before: After: Restore + if isdirectory(g:dir . '/.git') + call delete(g:dir . '/.git', 'd') + endif + unlet! b:ale_completion_enabled call ale#assert#TearDownLinterTest() @@ -29,3 +33,14 @@ Execute(should set bingo options): AssertLinter 'bingo', \ ale#Escape('bingo') . ' --mode stdio --trace' + +Execute(Should return directory for 'go.mod' if found in parent directory): + call ale#test#SetFilename('../go_files/test.go') + + AssertLSPProject ale#path#Simplify(g:dir . '/../go_files') + +Execute(Should return nearest directory with '.git' if found in parent directory): + call ale#test#SetFilename('test.go') + call mkdir(g:dir . '/.git') + + AssertLSPProject g:dir diff --git a/test/test_bingo_find_project_root.vader b/test/test_bingo_find_project_root.vader deleted file mode 100644 index 540183d0..00000000 --- a/test/test_bingo_find_project_root.vader +++ /dev/null @@ -1,21 +0,0 @@ -Before: - call ale#test#SetDirectory('/testplugin/test') - runtime ale_linters/go/bingo.vim - -After: - call ale#test#RestoreDirectory() - call ale#linter#Reset() - -Execute(Should return directory for 'go.mod' if found in parent directory): - call ale#test#SetFilename('go_files/test.go') - - AssertEqual - \ ale#path#Simplify(g:dir . '/go_files'), - \ ale_linters#go#bingo#FindProjectRoot(bufnr('')) - -Execute(Should return nearest directory with '.git' if found in parent directory): - call ale#test#SetFilename('test.go') - - AssertEqual - \ fnamemodify(ale#path#Simplify('/testplugin'), ':p:h'), - \ ale_linters#go#bingo#FindProjectRoot(bufnr('')) |