Mercurial > vim
diff src/testdir/test_xxd.vim @ 26254:3a13efec0016 v8.2.3658
patch 8.2.3658: duplicate code in xxd
Commit: https://github.com/vim/vim/commit/48608b4a4bfab4b9c0c9199d57b7e876c56db74c
Author: DungSaga <dungsaga@users.noreply.github.com>
Date: Wed Nov 24 11:18:07 2021 +0000
patch 8.2.3658: duplicate code in xxd
Problem: Duplicate code in xxd.
Solution: Merge duplicated code. Add more tests. (closes https://github.com/vim/vim/issues/9192)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 Nov 2021 12:30:04 +0100 |
parents | 542cc55a660b |
children | 4061623aa316 |
line wrap: on
line diff
--- a/src/testdir/test_xxd.vim +++ b/src/testdir/test_xxd.vim @@ -263,6 +263,20 @@ func Test_xxd_usage() endfor endfunc +func Test_xxd_ignore_garbage() + new + exe 'r! printf "\n\r xxxx 0: 42 42" | ' . s:xxd_cmd . ' -r' + call assert_match('BB', join(getline(1, 3))) + bwipe! +endfunc + +func Test_xxd_bit_dump() + new + exe 'r! printf "123456" | ' . s:xxd_cmd . ' -b1' + call assert_match('00000000: 00110001 00110010 00110011 00110100 00110101 00110110 123456', join(getline(1, 3))) + bwipe! +endfunc + func Test_xxd_version() new exe 'r! ' . s:xxd_cmd . ' -v'