Mercurial > vim
comparison src/testdir/test_xxd.vim @ 26038:542cc55a660b v8.2.3553
patch 8.2.3553: xxd test fails on MS-Windows
Commit: https://github.com/vim/vim/commit/5a5c111e79d1ea4b24133eaf44deab42a8e78eed
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 22 15:11:37 2021 +0100
patch 8.2.3553: xxd test fails on MS-Windows
Problem: Xxd test fails on MS-Windows.
Solution: Split shell command in two.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 22 Oct 2021 16:15:05 +0200 |
parents | c8165ec9dcad |
children | 3a13efec0016 |
comparison
equal
deleted
inserted
replaced
26037:cd64a3fdf055 | 26038:542cc55a660b |
---|---|
212 bwipe! | 212 bwipe! |
213 call delete('XXDfile') | 213 call delete('XXDfile') |
214 endfunc | 214 endfunc |
215 | 215 |
216 func Test_xxd_patch() | 216 func Test_xxd_patch() |
217 let cmd = 'silent !' .. s:xxd_cmd .. ' -r Xxxdin Xxxdfile; ' .. s:xxd_cmd .. ' -g1 Xxxdfile > Xxxdout' | 217 let cmd1 = 'silent !' .. s:xxd_cmd .. ' -r Xxxdin Xxxdfile' |
218 let cmd2 = 'silent !' .. s:xxd_cmd .. ' -g1 Xxxdfile > Xxxdout' | |
218 call writefile(["2: 41 41", "8: 42 42"], 'Xxxdin') | 219 call writefile(["2: 41 41", "8: 42 42"], 'Xxxdin') |
219 call writefile(['::::::::'], 'Xxxdfile') | 220 call writefile(['::::::::'], 'Xxxdfile') |
220 exe cmd | 221 exe cmd1 |
222 exe cmd2 | |
221 call assert_equal(['00000000: 3a 3a 41 41 3a 3a 3a 3a 42 42 ::AA::::BB'], readfile('Xxxdout')) | 223 call assert_equal(['00000000: 3a 3a 41 41 3a 3a 3a 3a 42 42 ::AA::::BB'], readfile('Xxxdout')) |
222 | 224 |
223 call writefile(["2: 43 43 ", "8: 44 44"], 'Xxxdin') | 225 call writefile(["2: 43 43 ", "8: 44 44"], 'Xxxdin') |
224 exe cmd | 226 exe cmd1 |
227 exe cmd2 | |
225 call assert_equal(['00000000: 3a 3a 43 43 3a 3a 3a 3a 44 44 ::CC::::DD'], readfile('Xxxdout')) | 228 call assert_equal(['00000000: 3a 3a 43 43 3a 3a 3a 3a 44 44 ::CC::::DD'], readfile('Xxxdout')) |
226 | 229 |
227 call writefile(["2: 45 45 ", "8: 46 46"], 'Xxxdin') | 230 call writefile(["2: 45 45 ", "8: 46 46"], 'Xxxdin') |
228 exe cmd | 231 exe cmd1 |
232 exe cmd2 | |
229 call assert_equal(['00000000: 3a 3a 45 45 3a 3a 3a 3a 46 46 ::EE::::FF'], readfile('Xxxdout')) | 233 call assert_equal(['00000000: 3a 3a 45 45 3a 3a 3a 3a 46 46 ::EE::::FF'], readfile('Xxxdout')) |
230 | 234 |
231 call writefile(["2: 41 41", "08: 42 42"], 'Xxxdin') | 235 call writefile(["2: 41 41", "08: 42 42"], 'Xxxdin') |
232 call writefile(['::::::::'], 'Xxxdfile') | 236 call writefile(['::::::::'], 'Xxxdfile') |
233 exe cmd | 237 exe cmd1 |
238 exe cmd2 | |
234 call assert_equal(['00000000: 3a 3a 41 41 3a 3a 3a 3a 42 42 ::AA::::BB'], readfile('Xxxdout')) | 239 call assert_equal(['00000000: 3a 3a 41 41 3a 3a 3a 3a 42 42 ::AA::::BB'], readfile('Xxxdout')) |
235 | 240 |
236 call writefile(["2: 43 43 ", "09: 44 44"], 'Xxxdin') | 241 call writefile(["2: 43 43 ", "09: 44 44"], 'Xxxdin') |
237 exe cmd | 242 exe cmd1 |
243 exe cmd2 | |
238 call assert_equal(['00000000: 3a 3a 43 43 3a 3a 3a 3a 42 44 44 ::CC::::BDD'], readfile('Xxxdout')) | 244 call assert_equal(['00000000: 3a 3a 43 43 3a 3a 3a 3a 42 44 44 ::CC::::BDD'], readfile('Xxxdout')) |
239 | 245 |
240 call writefile(["2: 45 45 ", "0a: 46 46"], 'Xxxdin') | 246 call writefile(["2: 45 45 ", "0a: 46 46"], 'Xxxdin') |
241 exe cmd | 247 exe cmd1 |
248 exe cmd2 | |
242 call assert_equal(['00000000: 3a 3a 45 45 3a 3a 3a 3a 42 44 46 46 ::EE::::BDFF'], readfile('Xxxdout')) | 249 call assert_equal(['00000000: 3a 3a 45 45 3a 3a 3a 3a 42 44 46 46 ::EE::::BDFF'], readfile('Xxxdout')) |
243 | 250 |
244 call delete('Xxxdin') | 251 call delete('Xxxdin') |
245 call delete('Xxxdfile') | 252 call delete('Xxxdfile') |
246 call delete('Xxxdout') | 253 call delete('Xxxdout') |