Same as before but with the promised patch! Test 5 and 6 in testdir/test_xxd.c use the file runtime/doc/xxd.1 to test the xxd utility. Those tests reference specific byte offsets but those values assume that xxd,1 has unix line endings. Hence the tests fail on any Windows platform.
I have attached a patch that corrects this. It makes a copy of xxd.1 with unix line endings in testdir, runs the tests on it and then cleans-up. -mike -- -- 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]. For more options, visit https://groups.google.com/d/optout.
>From c1957cd75328a928071af2c07e7ccfa0c07fe7f4 Mon Sep 17 00:00:00 2001 From: msoyka-of-wharton <[email protected]> Date: Sat, 26 Jan 2019 15:42:22 -0500 Subject: [PATCH] Fix eol problem in Test_xxd() tests 5 & 6 --- src/testdir/test_xxd.vim | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim index 776266711..4ff1c1627 100644 --- a/src/testdir/test_xxd.vim +++ b/src/testdir/test_xxd.vim @@ -53,13 +53,19 @@ func Test_xxd() call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test)) endfor + " The next tests utilize the xxd man page. + " For these tests to pass, the line endings must be "unix". + let fname = 'xxd.1' + let fpath = '../../runtime/doc/' . fname + if has('win32') && !filereadable(fpath) + let fpath = '../../doc/' . fname + endif + %d + exe '0r ' fpath '| set ff=unix | $d | w' fname '| bwipe!' fname + " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line let s:test += 1 %d - let fname = '../../runtime/doc/xxd.1' - if has('win32') && !filereadable(fname) - let fname = '../../doc/xxd.1' - endif exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . fname $d let expected = [ @@ -80,6 +86,9 @@ func Test_xxd() call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test)) endfor + " Cleanup after tests 5 and 6 + call delete(fname) + " Test 7: Print C include let s:test += 1 call writefile(['TESTabcd09'], 'XXDfile') -- 2.18.0.windows.1
