To: vim_dev@googlegroups.com Subject: Patch 9.0.1676 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1676 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. Files: src/testdir/test_crypt.vim *** ../vim-9.0.1675/src/testdir/test_crypt.vim 2023-06-27 18:57:06.448499587 +0100 --- src/testdir/test_crypt.vim 2023-07-08 00:48:35.930195818 +0100 *************** *** 22,32 **** func Common_head_only(text) " This was crashing Vim ! split Xtest.txt call setline(1, a:text) wq ! call feedkeys(":split Xtest.txt\foobar\", "tx") ! call delete('Xtest.txt') call assert_match('VimCrypt', getline(1)) bwipe! endfunc --- 22,32 ---- func Common_head_only(text) " This was crashing Vim ! split Xtest_head.txt call setline(1, a:text) wq ! call feedkeys(":split Xtest_head.txt\foobar\", "tx") ! call delete('Xtest_head.txt') call assert_match('VimCrypt', getline(1)) bwipe! endfunc *************** *** 49,55 **** " If the blowfish test fails 'cryptmethod' will be 'zip' now. call assert_equal(a:method, &cryptmethod) ! split Xtest.txt let text =<< trim END 01234567890123456789012345678901234567, line 2 foo bar blah, --- 49,55 ---- " If the blowfish test fails 'cryptmethod' will be 'zip' now. call assert_equal(a:method, &cryptmethod) ! split Xtest_uncrypt.txt let text =<< trim END 01234567890123456789012345678901234567, line 2 foo bar blah, *************** *** 60,70 **** call assert_equal('*****', &key) w! bwipe! ! call feedkeys(":split Xtest.txt\foobar\", 'xt') call assert_equal(text, getline(1, 3)) set key= cryptmethod& bwipe! ! call delete('Xtest.txt') endfunc func Test_crypt_zip() --- 60,70 ---- call assert_equal('*****', &key) w! bwipe! ! call feedkeys(":split Xtest_uncrypt.txt\foobar\", 'xt') call assert_equal(text, getline(1, 3)) set key= cryptmethod& bwipe! ! call delete('Xtest_uncrypt.txt') endfunc func Test_crypt_zip() *************** *** 113,129 **** endfunc func Uncrypt_stable(method, crypted_text, key, uncrypted_text) ! split Xtest.txt set bin noeol key= fenc=latin1 exe "set cryptmethod=" . a:method call setline(1, a:crypted_text) w! bwipe! set nobin ! call feedkeys(":split Xtest.txt\" . a:key . "\", 'xt') call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text))) bwipe! ! call delete('Xtest.txt') set key= endfunc --- 113,129 ---- endfunc func Uncrypt_stable(method, crypted_text, key, uncrypted_text) ! split Xtest_stable.txt set bin noeol key= fenc=latin1 exe "set cryptmethod=" . a:method call setline(1, a:crypted_text) w! bwipe! set nobin ! call feedkeys(":split Xtest_stable.txt\" . a:key . "\", 'xt') call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text))) bwipe! ! call delete('Xtest_stable.txt') set key= endfunc *************** *** 132,144 **** throw 'Skipped: xxd program missing' endif " use xxd to write the binary content ! call system(s:xxd_cmd .. ' -r >Xtest.txt', a:hex) let cmd = (a:verbose ? ':verbose' : '') .. ! \ ":split Xtest.txt\" . a:key . "\" call feedkeys(cmd, 'xt') call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text))) bwipe! ! call delete('Xtest.txt') set key= endfunc --- 132,144 ---- throw 'Skipped: xxd program missing' endif " use xxd to write the binary content ! call system(s:xxd_cmd .. ' -r >Xtest_stable_xxd.txt', a:hex) let cmd = (a:verbose ? ':verbose' : '') .. ! \ ":split Xtest_stable_xxd.txt\" . a:key . "\" call feedkeys(cmd, 'xt') call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text))) bwipe! ! call delete('Xtest_stable_xxd.txt') set key= endfunc *************** *** 354,360 **** func Test_crypt_key_mismatch() set cryptmethod=blowfish ! split Xtest.txt call setline(1, 'nothing') call feedkeys(":X\foobar\nothing\", 'xt') call assert_match("Keys don't match!", execute(':2messages')) --- 354,360 ---- func Test_crypt_key_mismatch() set cryptmethod=blowfish ! split Xtest_mismatch.txt call setline(1, 'nothing') call feedkeys(":X\foobar\nothing\", 'xt') call assert_match("Keys don't match!", execute(':2messages')) *** ../vim-9.0.1675/src/version.c 2023-07-08 00:25:52.266435700 +0100 --- src/version.c 2023-07-08 00:51:52.022884380 +0100 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1676, /**/ -- In war we're tough and able. Quite indefatigable Between our quests We sequin vests And impersonate Clark Gable It's a busy life in Camelot. I have to push the pram a lot. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///