0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

patch 8.2.3120: crypt with sodium test fails on MS-Windows

Problem:    Crypt with sodium test fails on MS-Windows.
Solution:   Make the tests pass. (closes #8428)
This commit is contained in:
Bram Moolenaar
2021-07-08 11:37:50 +02:00
parent 6a9e5c69cf
commit db86472770
2 changed files with 7 additions and 2 deletions

View File

@@ -124,6 +124,7 @@ endfunc
func Test_uncrypt_xchacha20_invalid() func Test_uncrypt_xchacha20_invalid()
CheckFeature sodium CheckFeature sodium
" load an invalid encrypted file and verify it can be decrypted with an " load an invalid encrypted file and verify it can be decrypted with an
" error message " error message
try try
@@ -142,6 +143,7 @@ endfunc
func Test_uncrypt_xchacha20_2() func Test_uncrypt_xchacha20_2()
CheckFeature sodium CheckFeature sodium
sp Xcrypt_sodium.txt sp Xcrypt_sodium.txt
" Create a larger file, so that Vim will write in several blocks " Create a larger file, so that Vim will write in several blocks
call setline(1, range(1,4000)) call setline(1, range(1,4000))
@@ -159,7 +161,7 @@ func Test_uncrypt_xchacha20_2()
" successfully decrypted " successfully decrypted
call assert_equal(range(1, 4000)->map( {_, v -> string(v)}), getline(1,'$')) call assert_equal(range(1, 4000)->map( {_, v -> string(v)}), getline(1,'$'))
set key= set key=
w! w! ++ff=unix
" enryption removed " enryption removed
call assert_match('"Xcrypt_sodium.txt" 4000L, 18893B written', execute(':message')) call assert_match('"Xcrypt_sodium.txt" 4000L, 18893B written', execute(':message'))
bw! bw!
@@ -170,6 +172,7 @@ endfunc
func Test_uncrypt_xchacha20_3_persistent_undo() func Test_uncrypt_xchacha20_3_persistent_undo()
CheckFeature sodium CheckFeature sodium
CheckFeature persistent_undo CheckFeature persistent_undo
sp Xcrypt_sodium_undo.txt sp Xcrypt_sodium_undo.txt
set cryptmethod=xchacha20 undofile set cryptmethod=xchacha20 undofile
call feedkeys(":X\<CR>sodium\<CR>sodium\<CR>", 'xt') call feedkeys(":X\<CR>sodium\<CR>sodium\<CR>", 'xt')
@@ -191,7 +194,7 @@ func Test_uncrypt_xchacha20_3_persistent_undo()
" should fail " should fail
norm! u norm! u
call assert_match('Already at oldest change', execute(':1mess')) call assert_match('Already at oldest change', execute(':1mess'))
call assert_fails('verbose rundo' .. fnameescape(ufile), 'E822') call assert_fails('verbose rundo ' .. fnameescape(ufile), 'E822')
bw! bw!
set undolevels& cryptmethod& undofile& set undolevels& cryptmethod& undofile&
call delete('Xcrypt_sodium_undo.txt') call delete('Xcrypt_sodium_undo.txt')

View File

@@ -755,6 +755,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 */
/**/
3120,
/**/ /**/
3119, 3119,
/**/ /**/