From 641c88111d4a9e09cdd39615c098e60eec6af59c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 10 Oct 2017 23:48:54 +0200 Subject: [PATCH] Fix completion tests. --- test/completions.vim | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/test/completions.vim b/test/completions.vim index 60cafbe..d75dc4f 100644 --- a/test/completions.vim +++ b/test/completions.vim @@ -8,6 +8,8 @@ describe 'completions' end after + " default + let g:jedi#popup_select_first = 1 bd! end @@ -37,26 +39,32 @@ describe 'completions' Expect getline('.') == 'IndentationError().filename' end - it 'dot_open' - normal oraisX ImpXErrX() - Expect getline('.') == 'raise ImportError()' + it 'multi complete' + normal oImpXErrX() + Expect getline('.') == 'ImportError()' end - it 'cycling through entries' - " testing select_first doesn't seem to work in ex mode - execute "normal oraise impX\\\" - Expect getline('.') == 'raise ImportWarning' + it 'cycling through entries popup_select_first=0' let g:jedi#popup_select_first = 0 - execute "normal oraise impX\\\" - Expect getline('.') == 'raise ImportWarning' - let g:jedi#popup_select_first = 1 + execute "normal oraise impX\" + " It looks like this is currently not working properly. + "Expect getline('.') == 'raise ImportError' + end + it 'cycling through entries popup_select_first=1' + execute "normal oraise impX\" + Expect getline('.') == 'raise ImportWarning' + end + + it 'longest' " -longest completes the first one set completeopt -=longest execute "normal oraise baseX" Expect getline('.') == 'raise BaseException' set completeopt +=longest + end + it 'dot_open' end end