diff --git a/tests/test_startuptime.vim b/tests/test_startuptime.vim index 7d919e9..bcdc0c0 100644 --- a/tests/test_startuptime.vim +++ b/tests/test_startuptime.vim @@ -123,6 +123,23 @@ call assert_equal(2, winnr('$')) close call assert_equal(1, winnr('$')) +" ############################################### +" # Test default call. +" ############################################### + +augroup test + autocmd! + autocmd User StartupTimeSaved let autocmd = 1 +augroup END +StartupTime +sleep 3 +" Without --save, no autocmd should execute. +call assert_false(has_key(g:, 'autocmd')) +" Without hidden there should be a new window. +call assert_equal(2, winnr('$')) +close +call assert_equal(1, winnr('$')) + " ############################################### " # Ensure 'opening buffers' event. " ############################################### @@ -132,7 +149,7 @@ call assert_equal(1, winnr('$')) augroup test autocmd! augroup END -StartupTime --save save3 +StartupTime --hidden --save save3 sleep 3 let s:has_opening_buffers = v:false for s:item in g:save3.items @@ -142,20 +159,3 @@ for s:item in g:save3.items endif endfor call assert_false(s:has_opening_buffers) - -" ############################################### -" # Test default call. -" ############################################### - -augroup test - autocmd! - autocmd User StartupTimeSaved let autocmd = 1 -augroup END -StartupTime -sleep 3 -" Without --save, no autocmd should execute. -call assert_false(has_key(g:, 'autocmd')) -" Without hidden there should be a new window. -call assert_equal(2, winnr('$')) -close -call assert_equal(1, winnr('$'))