diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-27 14:41:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-27 14:41:43 +0100 |
commit | 0eb220c03057096a26dda9c5544b362dce6df4d7 (patch) | |
tree | cedd98d8f99a4f7af40986adcb80614784a03934 | |
parent | e3d065454408a103c39308651dd7793f0bf55ba6 (diff) | |
download | vim-git-0eb220c03057096a26dda9c5544b362dce6df4d7.tar.gz |
patch 8.1.0831: xxd test fails if man page has dos fileformatv8.1.0831
Problem: Xxd test fails if man page has dos fileformat.
Solution: Make a copy with unix fileformat.
-rw-r--r-- | src/testdir/test_xxd.vim | 21 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim index 776266711..e4e775523 100644 --- a/src/testdir/test_xxd.vim +++ b/src/testdir/test_xxd.vim @@ -53,14 +53,20 @@ func Test_xxd() call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test)) endfor + " The following tests use the xxd man page. + " For these tests to pass, the fileformat must be "unix". + let man_copy = 'Xxd.1' + let man_page = '../../runtime/doc/xxd.1' + if has('win32') && !filereadable(man_page) + let man_page = '../../doc/xxd.1' + endif + %d + exe '0r ' man_page '| set ff=unix | $d | w' man_copy '| bwipe!' man_copy + " 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 + exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . man_copy $d let expected = [ \ '2e54482058584420312022417567757374203139', @@ -75,11 +81,14 @@ func Test_xxd() let s:test += 1 for arg in ['-l 13', '-l13', '-len 13'] %d - exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . fname + exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . man_copy $d 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(man_copy) + " Test 7: Print C include let s:test += 1 call writefile(['TESTabcd09'], 'XXDfile') diff --git a/src/version.c b/src/version.c index 989179632..1e5f7e3b6 100644 --- a/src/version.c +++ b/src/version.c @@ -784,6 +784,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 831, +/**/ 830, /**/ 829, |