To: vim_dev@googlegroups.com Subject: Patch 8.2.3496 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3496 Problem: Crypt test fails on MS-Windows if xxd was not installed yet. Solution: Use the just built xxd executable if it exists. (James McCoy, closes #8929) Files: src/testdir/test_crypt.vim *** ../vim-8.2.3495/src/testdir/test_crypt.vim 2021-07-25 13:36:01.569551193 +0100 --- src/testdir/test_crypt.vim 2021-10-11 16:22:23.535782590 +0100 *************** *** 3,8 **** --- 3,15 ---- source check.vim CheckFeature cryptv + let s:xxd_cmd = '' + if empty($XXDPROG) && executable('..\xxd\xxd.exe') + let s:xxd_cmd = '..\xxd\xxd.exe' + elseif !empty($XXDPROG) && executable($XXDPROG) + let s:xxd_cmd = $XXDPROG + endif + func Common_head_only(text) " This was crashing Vim split Xtest.txt *************** *** 81,88 **** endfunc func Uncrypt_stable_xxd(method, hex, key, uncrypted_text) " use xxd to write the binary content ! call system('xxd -r >Xtest.txt', a:hex) call feedkeys(":split Xtest.txt\" . a:key . "\", 'xt') call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text))) bwipe! --- 88,98 ---- endfunc func Uncrypt_stable_xxd(method, hex, key, uncrypted_text) + if empty(s:xxd_cmd) + throw 'Skipped: xxd program missing' + endif " use xxd to write the binary content ! call system(s:xxd_cmd .. ' -r >Xtest.txt', a:hex) call feedkeys(":split Xtest.txt\" . a:key . "\", 'xt') call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text))) bwipe! *** ../vim-8.2.3495/src/version.c 2021-10-11 16:08:03.238786769 +0100 --- src/version.c 2021-10-11 16:25:56.530067593 +0100 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3496, /**/ -- Why is it called "Windows"? "Gates" would be more appropriate... /// 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 ///