install.fairie/dotfiles/.vim/plugged/YouCompleteMe/test/filesize.test.vim
Git E2E Dev Test Username 1dcbe335e1 git subrepo clone (merge) https://github.com/ycm-core/YouCompleteMe.git ./dotfiles/.vim/plugged/YouCompleteMe
subrepo:
  subdir:   "dotfiles/.vim/plugged/YouCompleteMe"
  merged:   "99ccab251"
upstream:
  origin:   "https://github.com/ycm-core/YouCompleteMe.git"
  branch:   "master"
  commit:   "99ccab251"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:46 -04:00

46 lines
1.1 KiB
VimL

function! SetUp()
let g:ycm_use_clangd = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_auto_trigger = 1
let g:ycm_keep_logfiles = 1
let g:ycm_always_populate_location_list = 1
" diagnostics take ages
let g:ycm_test_min_delay = 7
call youcompleteme#test#setup#SetUp()
endfunction
function! TearDown()
call youcompleteme#test#setup#CleanUp()
endfunction
function! Test_Open_Unsupported_Filetype_Messages()
messages clear
enew
let X = join( map( range( 0, 1000 * 1024 + 1 ), {->'X'} ), '' )
call append( line( '$' ), X )
silent w! Xtest
let l:stderr = substitute( execute( '1messages' ), '\n', '\t', 'g' )
call assert_notmatch( 'the file exceeded the max size', stderr )
call delete( 'Xtest' )
endfunction
function! Test_Open_Supported_Filetype_Messages()
enew
let X = join( map( range( 0, 1000 * 1024 + 1 ), {->'X'} ), '' )
call append( line( '$' ), X )
silent w! Xtest
setf cpp
let l:stderr = substitute( execute( '1messages' ), '\n', '\t', 'g' )
call assert_match( 'the file exceeded the max size', stderr )
call assert_equal( 1, b:ycm_largefile )
messages clear
call delete( 'Xtest' )
endfunction