Patch 8.2.2952
Problem: Recover test fails on big endian systems.
Solution: Disable the failing test on big endian systems. (Yegappan
Lakshmanan, closes #8335)
Files: src/testdir/test_recover.vim, src/testdir/test_swap.vim
*** ../vim-8.2.2951/src/testdir/test_recover.vim 2021-06-05
20:59:18.623771739 +0200
--- src/testdir/test_recover.vim 2021-06-06 17:12:29.316357936 +0200
***************
*** 139,145 ****
new Xfile1
call setline(1, ['a', 'b', 'c'])
preserve
! let b = readblob('.Xfile1.swp')
call writefile(b, '.Xfile1.swm')
call writefile(b, '.Xfile1.swn')
call writefile(b, '.Xfile1.swo')
--- 139,145 ----
new Xfile1
call setline(1, ['a', 'b', 'c'])
preserve
! let b = readblob(swapname(''))
call writefile(b, '.Xfile1.swm')
call writefile(b, '.Xfile1.swn')
call writefile(b, '.Xfile1.swo')
***************
*** 168,173 ****
--- 168,174 ----
" Test for :recover using a corrupted swap file
func Test_recover_corrupted_swap_file()
CheckUnix
+
" recover using a partial swap file
call writefile(0z1234, '.Xfile1.swp')
call assert_fails('recover Xfile1', 'E295:')
***************
*** 183,194 ****
preserve
let sn = swapname('')
let b = readblob(sn)
bw!
! " clear the B0_MAGIC_LONG field
! let b[1008:1011] = 0z00000000
! call writefile(b, sn)
! let msg = execute('recover Xfile1')
! call assert_match('the file has been damaged', msg)
bw!
call delete(sn)
endfunc
--- 184,224 ----
preserve
let sn = swapname('')
let b = readblob(sn)
+ let save_b = copy(b)
bw!
! " Run these tests only on little-endian systems. These tests fail on a
! " big-endian system (IBM S390x system).
! if b[1008:1011] == 0z33323130
! \ && b[4096:4097] == 0z7470
! \ && b[8192:8193] == 0z6164
!
! " clear the B0_MAGIC_LONG field
! let b[1008:1011] = 0z00000000
! call writefile(b, sn)
! let msg = execute('recover Xfile1')
! call assert_match('the file has been damaged', msg)
! bw!
!
! " clear the pointer ID
! let b = copy(save_b)
! let b[4096:4097] = 0z0000
! call writefile(b, sn)
! call assert_fails('recover Xfile1', 'E310:')
! bw!
!
! " clear the data block ID
! let b = copy(save_b)
! let b[8192:8193] = 0z0000
! call writefile(b, sn)
! call assert_fails('recover Xfile1', 'E312:')
! bw!
!
! " remove the data block
! let b = copy(save_b)
! call writefile(b[:8191], sn)
! call assert_fails('recover Xfile1', 'E312:')
! endif
!
bw!
call delete(sn)
endfunc
*** ../vim-8.2.2951/src/testdir/test_swap.vim 2021-06-05 20:59:18.623771739
+0200
--- src/testdir/test_swap.vim 2021-06-06 17:09:47.604768585 +0200
***************
*** 487,493 ****
func Test_missing_swap_file()
CheckUnix
new Xfile1
! call delete('.Xfile1.swp')
call assert_fails('file Xfile2', 'E301:')
call assert_equal('Xfile2', bufname())
call assert_true(bufexists('Xfile1'))
--- 487,493 ----
func Test_missing_swap_file()
CheckUnix
new Xfile1
! call delete(swapname(''))
call assert_fails('file Xfile2', 'E301:')
call assert_equal('Xfile2', bufname())
call assert_true(bufexists('Xfile1'))
*** ../vim-8.2.2951/src/version.c 2021-06-06 17:02:49.753789485 +0200
--- src/version.c 2021-06-06 17:11:29.440510691 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2952,
/**/
--
A year spent in artificial intelligence is enough to make one
believe in God.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202106061513.156FDj49337375%40masaka.moolenaar.net.