mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.1676: warning for buffer in use when exiting early
Problem: Warning for buffer in use when exiting early. Solution: Change file names to be able to see what buffer is in use when exiting.
This commit is contained in:
parent
7c2beb48ef
commit
16abd997c9
@ -22,11 +22,11 @@ endif
|
|||||||
|
|
||||||
func Common_head_only(text)
|
func Common_head_only(text)
|
||||||
" This was crashing Vim
|
" This was crashing Vim
|
||||||
split Xtest.txt
|
split Xtest_head.txt
|
||||||
call setline(1, a:text)
|
call setline(1, a:text)
|
||||||
wq
|
wq
|
||||||
call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", "tx")
|
call feedkeys(":split Xtest_head.txt\<CR>foobar\<CR>", "tx")
|
||||||
call delete('Xtest.txt')
|
call delete('Xtest_head.txt')
|
||||||
call assert_match('VimCrypt', getline(1))
|
call assert_match('VimCrypt', getline(1))
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
@ -49,7 +49,7 @@ func Crypt_uncrypt(method)
|
|||||||
" If the blowfish test fails 'cryptmethod' will be 'zip' now.
|
" If the blowfish test fails 'cryptmethod' will be 'zip' now.
|
||||||
call assert_equal(a:method, &cryptmethod)
|
call assert_equal(a:method, &cryptmethod)
|
||||||
|
|
||||||
split Xtest.txt
|
split Xtest_uncrypt.txt
|
||||||
let text =<< trim END
|
let text =<< trim END
|
||||||
01234567890123456789012345678901234567,
|
01234567890123456789012345678901234567,
|
||||||
line 2 foo bar blah,
|
line 2 foo bar blah,
|
||||||
@ -60,11 +60,11 @@ func Crypt_uncrypt(method)
|
|||||||
call assert_equal('*****', &key)
|
call assert_equal('*****', &key)
|
||||||
w!
|
w!
|
||||||
bwipe!
|
bwipe!
|
||||||
call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", 'xt')
|
call feedkeys(":split Xtest_uncrypt.txt\<CR>foobar\<CR>", 'xt')
|
||||||
call assert_equal(text, getline(1, 3))
|
call assert_equal(text, getline(1, 3))
|
||||||
set key= cryptmethod&
|
set key= cryptmethod&
|
||||||
bwipe!
|
bwipe!
|
||||||
call delete('Xtest.txt')
|
call delete('Xtest_uncrypt.txt')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_crypt_zip()
|
func Test_crypt_zip()
|
||||||
@ -113,17 +113,17 @@ func Test_crypt_sodium_v2_startup()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Uncrypt_stable(method, crypted_text, key, uncrypted_text)
|
func Uncrypt_stable(method, crypted_text, key, uncrypted_text)
|
||||||
split Xtest.txt
|
split Xtest_stable.txt
|
||||||
set bin noeol key= fenc=latin1
|
set bin noeol key= fenc=latin1
|
||||||
exe "set cryptmethod=" . a:method
|
exe "set cryptmethod=" . a:method
|
||||||
call setline(1, a:crypted_text)
|
call setline(1, a:crypted_text)
|
||||||
w!
|
w!
|
||||||
bwipe!
|
bwipe!
|
||||||
set nobin
|
set nobin
|
||||||
call feedkeys(":split Xtest.txt\<CR>" . a:key . "\<CR>", 'xt')
|
call feedkeys(":split Xtest_stable.txt\<CR>" . a:key . "\<CR>", 'xt')
|
||||||
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
|
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
|
||||||
bwipe!
|
bwipe!
|
||||||
call delete('Xtest.txt')
|
call delete('Xtest_stable.txt')
|
||||||
set key=
|
set key=
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@ -132,13 +132,13 @@ func Uncrypt_stable_xxd(method, hex, key, uncrypted_text, verbose)
|
|||||||
throw 'Skipped: xxd program missing'
|
throw 'Skipped: xxd program missing'
|
||||||
endif
|
endif
|
||||||
" use xxd to write the binary content
|
" use xxd to write the binary content
|
||||||
call system(s:xxd_cmd .. ' -r >Xtest.txt', a:hex)
|
call system(s:xxd_cmd .. ' -r >Xtest_stable_xxd.txt', a:hex)
|
||||||
let cmd = (a:verbose ? ':verbose' : '') ..
|
let cmd = (a:verbose ? ':verbose' : '') ..
|
||||||
\ ":split Xtest.txt\<CR>" . a:key . "\<CR>"
|
\ ":split Xtest_stable_xxd.txt\<CR>" . a:key . "\<CR>"
|
||||||
call feedkeys(cmd, 'xt')
|
call feedkeys(cmd, 'xt')
|
||||||
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
|
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
|
||||||
bwipe!
|
bwipe!
|
||||||
call delete('Xtest.txt')
|
call delete('Xtest_stable_xxd.txt')
|
||||||
set key=
|
set key=
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ endfunc
|
|||||||
func Test_crypt_key_mismatch()
|
func Test_crypt_key_mismatch()
|
||||||
set cryptmethod=blowfish
|
set cryptmethod=blowfish
|
||||||
|
|
||||||
split Xtest.txt
|
split Xtest_mismatch.txt
|
||||||
call setline(1, 'nothing')
|
call setline(1, 'nothing')
|
||||||
call feedkeys(":X\<CR>foobar\<CR>nothing\<CR>", 'xt')
|
call feedkeys(":X\<CR>foobar\<CR>nothing\<CR>", 'xt')
|
||||||
call assert_match("Keys don't match!", execute(':2messages'))
|
call assert_match("Keys don't match!", execute(':2messages'))
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1676,
|
||||||
/**/
|
/**/
|
||||||
1675,
|
1675,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user