completion.test.vim 935 B

123456789101112131415161718192021222324252627282930313233343536
  1. function! SetUp()
  2. let g:ycm_use_clangd = 1
  3. let g:ycm_confirm_extra_conf = 0
  4. let g:ycm_auto_trigger = 1
  5. let g:ycm_keep_logfiles = 1
  6. let g:ycm_log_level = 'DEBUG'
  7. let g:ycm_add_preview_to_completeopt = 1
  8. let g:ycm_enable_semantic_highlighting = 1
  9. call youcompleteme#test#setup#SetUp()
  10. endfunction
  11. function! TearDown()
  12. call youcompleteme#test#setup#CleanUp()
  13. endfunction
  14. exe 'source' expand( "<sfile>:p:h" ) .. '/completion.common.vim'
  15. function! Test_Using_Upfront_Resolve()
  16. let debug_info = split( execute( 'YcmDebugInfo' ), "\n" )
  17. enew
  18. setf cpp
  19. call assert_equal( '', &completefunc )
  20. for line in debug_info
  21. if line =~# "^-- Resolve completions: "
  22. let ver = substitute( line, "^-- Resolve completions: ", "", "" )
  23. call assert_equal( 'Up front', ver, 'API version' )
  24. return
  25. endif
  26. endfor
  27. call assert_report( "Didn't find the resolve type in the YcmDebugInfo" )
  28. endfunction