Patch 8.2.3496

5 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 11, 2021, 11:28:17 AM10/11/21
to vim...@googlegroups.com

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\<CR>" . a:key . "\<CR>", '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\<CR>" . a:key . "\<CR>", '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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages