Skip to content

Commit

Permalink
Move test down and add --hidden.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Feb 11, 2024
1 parent 6001a6c commit d57986c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tests/test_startuptime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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.
" ###############################################
Expand All @@ -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
Expand All @@ -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('$'))

0 comments on commit d57986c

Please sign in to comment.