Mercurial > vim
comparison src/testdir/test_swap.vim @ 16459:4ea761ce795b v8.1.1234
patch 8.1.1234: swap file test fails on MS-Windows
commit https://github.com/vim/vim/commit/701df4eb64ae9945c63f83621b54aa69e1336a79
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 28 23:07:18 2019 +0200
patch 8.1.1234: swap file test fails on MS-Windows
Problem: Swap file test fails on MS-Windows.
Solution: Only compare the tail of the file names.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Apr 2019 23:15:07 +0200 |
parents | 4e9bea9b8025 |
children | b52ea9c5f1db |
comparison
equal
deleted
inserted
replaced
16458:ea5ad964e1ba | 16459:4ea761ce795b |
---|---|
192 call writefile(swapfile_bytes, swapfile_name) | 192 call writefile(swapfile_bytes, swapfile_name) |
193 let s:swap_choice = 'e' | 193 let s:swap_choice = 'e' |
194 let s:swapname = '' | 194 let s:swapname = '' |
195 split XswapfileText | 195 split XswapfileText |
196 quit | 196 quit |
197 call assert_equal(swapfile_name, s:swapname) | 197 call assert_equal(fnamemodify(swapfile_name, ':t'), fnamemodify(s:swapname, ':t')) |
198 | 198 |
199 " Write the swapfile with a modified PID, now it will be automatically | 199 " Write the swapfile with a modified PID, now it will be automatically |
200 " deleted. Process one should never be Vim. | 200 " deleted. Process one should never be Vim. |
201 let swapfile_bytes[24:27] = 0z01000000 | 201 let swapfile_bytes[24:27] = 0z01000000 |
202 call writefile(swapfile_bytes, swapfile_name) | 202 call writefile(swapfile_bytes, swapfile_name) |
209 let swapfile_bytes[28 + 80 + 899] = 0x55 | 209 let swapfile_bytes[28 + 80 + 899] = 0x55 |
210 call writefile(swapfile_bytes, swapfile_name) | 210 call writefile(swapfile_bytes, swapfile_name) |
211 let s:swapname = '' | 211 let s:swapname = '' |
212 split XswapfileText | 212 split XswapfileText |
213 quit | 213 quit |
214 call assert_equal(swapfile_name, s:swapname) | 214 call assert_equal(fnamemodify(swapfile_name, ':t'), fnamemodify(s:swapname, ':t')) |
215 | 215 |
216 call delete('XswapfileText') | 216 call delete('XswapfileText') |
217 call delete(swapfile_name) | 217 call delete(swapfile_name) |
218 augroup test_swapfile_delete | 218 augroup test_swapfile_delete |
219 autocmd! | 219 autocmd! |