diff options
author | Christian Brabandt <cb@256bit.org> | 2021-07-25 14:36:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-25 14:36:05 +0200 |
commit | 8a4c812ede5b01a8e71082c1ff4ebfcbf1bd515f (patch) | |
tree | 2da838678bac4dd3d5fa1681e818517421e0e86b /src/testdir/test_crypt.vim | |
parent | 3ed0d9379683246a77aa8c1a59da7a0ac6395339 (diff) | |
download | vim-git-8a4c812ede5b01a8e71082c1ff4ebfcbf1bd515f.tar.gz |
patch 8.2.3218: when using xchaha20 crypt undo file is not removedv8.2.3218
Problem: When using xchaha20 crypt undo file is not removed.
Solution: Reset 'undofile' and delete the file. (Christian Brabandt,
closes #8630, closes #8467)
Diffstat (limited to 'src/testdir/test_crypt.vim')
-rw-r--r-- | src/testdir/test_crypt.vim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/testdir/test_crypt.vim b/src/testdir/test_crypt.vim index 883c899cf..2e34c80a1 100644 --- a/src/testdir/test_crypt.vim +++ b/src/testdir/test_crypt.vim @@ -133,7 +133,7 @@ func Test_uncrypt_xchacha20_invalid() catch call assert_exception('pre-mature') endtry - call assert_match("Note: Encryption of swapfile not supported, disabling swap- and undofile", execute(':5messages')) + call assert_match("Note: Encryption of swapfile not supported, disabling swap file", execute(':5messages')) call assert_equal(0, &swapfile) call assert_equal("xchacha20", &cryptmethod) @@ -152,7 +152,7 @@ func Test_uncrypt_xchacha20_2() call feedkeys(":X\<CR>sodium\<CR>sodium\<CR>", 'xt') " swapfile disabled call assert_equal(0, &swapfile) - call assert_match("Note: Encryption of swapfile not supported, disabling swap- and undofile", execute(':messages')) + call assert_match("Note: Encryption of swapfile not supported, disabling swap file", execute(':messages')) w! " encrypted using xchacha20 call assert_match("\[xchacha20\]", execute(':messages')) @@ -176,7 +176,7 @@ func Test_uncrypt_xchacha20_3_persistent_undo() sp Xcrypt_sodium_undo.txt set cryptmethod=xchacha20 undofile call feedkeys(":X\<CR>sodium\<CR>sodium\<CR>", 'xt') - call assert_equal(0, &undofile) + call assert_equal(1, &undofile) let ufile=undofile(@%) call append(0, ['monday', 'tuesday', 'wednesday', 'thursday', 'friday']) call cursor(1, 1) @@ -189,6 +189,7 @@ func Test_uncrypt_xchacha20_3_persistent_undo() normal dd set undolevels=100 w! + call assert_equal(0, &undofile) bw! call feedkeys(":sp Xcrypt_sodium_undo.txt\<CR>sodium\<CR>", 'xt') " should fail |