" Tests for various functions.
source shared.vim
source check.vim
" Must be done first, since the alternate buffer must be unset.
func Test_00_bufexists()
call assert_equal(0, bufexists('does_not_exist'))
call assert_equal(1, bufexists(bufnr('%')))
call assert_equal(0, bufexists(0))
new Xfoo
let bn = bufnr('%')
call assert_equal(1, bufexists(bn))
call assert_equal(1, bufexists('Xfoo'))
call assert_equal(1, bufexists(getcwd() . '/Xfoo'))