diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-03-05 20:17:39 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-03-05 20:17:39 +0000 |
commit | 4390d872b6c9498527a43fc7c30a5384f2e1db12 (patch) | |
tree | 4e098811c1ab01f99b600ce5b477e254b6d8e348 /src/testdir | |
parent | c142d6513e8d71a8f26c5ca1cb00b7b3de9b15e6 (diff) |
patch 9.0.1383: xxd: combination of little endian and cols failsv9.0.1383
Problem: xxd: combination of little endian and cols fails. (Aapo
Rantalainen)
Solution: Round up the space taken by the hex output. (closes #12097)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_xxd.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim index 92a4d05998..d20ea9ce10 100644 --- a/src/testdir/test_xxd.vim +++ b/src/testdir/test_xxd.vim @@ -401,4 +401,18 @@ func Test_xxd_plain_one_line() endfor endfunc +func Test_xxd_little_endian_with_cols() + enew! + call writefile(["ABCDEF"], 'Xxdin', 'D') + exe 'r! ' .. s:xxd_cmd .. ' -e -c6 ' .. ' Xxdin' + call assert_equal('00000000: 44434241 4645 ABCDEF', getline(2)) + + enew! + call writefile(["ABCDEFGHI"], 'Xxdin', 'D') + exe 'r! ' .. s:xxd_cmd .. ' -e -c9 ' .. ' Xxdin' + call assert_equal('00000000: 44434241 48474645 49 ABCDEFGHI', getline(2)) + + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |