completion.test.vim 890 B

1234567891011121314151617181920212223242526272829303132333435
  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. call youcompleteme#test#setup#SetUp()
  9. endfunction
  10. function! TearDown()
  11. call youcompleteme#test#setup#CleanUp()
  12. endfunction
  13. exe 'source' expand( "<sfile>:p:h" ) .. '/completion.common.vim'
  14. function! Test_Using_Upfront_Resolve()
  15. let debug_info = split( execute( 'YcmDebugInfo' ), "\n" )
  16. enew
  17. setf cpp
  18. call assert_equal( '', &completefunc )
  19. for line in debug_info
  20. if line =~# "^-- Resolve completions: "
  21. let ver = substitute( line, "^-- Resolve completions: ", "", "" )
  22. call assert_equal( 'Up front', ver, 'API version' )
  23. return
  24. endif
  25. endfor
  26. call assert_report( "Didn't find the resolve type in the YcmDebugInfo" )
  27. endfunction