]> granicus.if.org Git - vim/commitdiff
patch 8.2.3120: crypt with sodium test fails on MS-Windows v8.2.3120
authorBram Moolenaar <Bram@vim.org>
Thu, 8 Jul 2021 09:37:50 +0000 (11:37 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 8 Jul 2021 09:37:50 +0000 (11:37 +0200)
Problem:    Crypt with sodium test fails on MS-Windows.
Solution:   Make the tests pass. (closes #8428)

src/testdir/test_crypt.vim
src/version.c

index 63bf8a5b2559891a1fb349e5c1a169a6bfb4d0e7..a18dfa3d17173c28cefb048fe119231381925aaf 100644 (file)
@@ -124,6 +124,7 @@ endfunc
 
 func Test_uncrypt_xchacha20_invalid()
   CheckFeature sodium
+
   " load an invalid encrypted file and verify it can be decrypted with an
   " error message
   try
@@ -142,6 +143,7 @@ endfunc
 
 func Test_uncrypt_xchacha20_2()
   CheckFeature sodium
+
   sp Xcrypt_sodium.txt
   " Create a larger file, so that Vim will write in several blocks
   call setline(1, range(1,4000))
@@ -159,7 +161,7 @@ func Test_uncrypt_xchacha20_2()
   " successfully decrypted
   call assert_equal(range(1, 4000)->map( {_, v -> string(v)}), getline(1,'$'))
   set key=
-  w!
+  w! ++ff=unix
   " enryption removed
   call assert_match('"Xcrypt_sodium.txt" 4000L, 18893B written', execute(':message'))
   bw!
@@ -170,6 +172,7 @@ endfunc
 func Test_uncrypt_xchacha20_3_persistent_undo()
   CheckFeature sodium
   CheckFeature persistent_undo
+
   sp Xcrypt_sodium_undo.txt
   set cryptmethod=xchacha20 undofile
   call feedkeys(":X\<CR>sodium\<CR>sodium\<CR>", 'xt')
@@ -191,7 +194,7 @@ func Test_uncrypt_xchacha20_3_persistent_undo()
   " should fail
   norm! u
   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!
   set undolevels& cryptmethod& undofile&
   call delete('Xcrypt_sodium_undo.txt')
index 03e2546c6e3389fd547112c511d7fe5725dbb4b8..39edf551ea933d611246af3e8a573c00fa1db86e 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3120,
 /**/
     3119,
 /**/