1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0823
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0823
Problem: Not sufficient testing of xxd.
Solution: Add some more test coverage.
Files: src/testdir/test_xxd.vim
*** ../vim-8.1.0822/src/testdir/test_xxd.vim 2019-01-25 21:52:12.190931859 +0100
--- src/testdir/test_xxd.vim 2019-01-26 14:08:03.325071260 +0100
***************
*** 75,81 ****
let s:test += 1
for arg in ['-l 13', '-l13', '-len 13']
%d
! exe '0r! ' . s:xxd_cmd . ' -s 0x36 -l 13 -cols 13 ' . fname
$d
call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
endfor
--- 75,81 ----
let s:test += 1
for arg in ['-l 13', '-l13', '-len 13']
%d
! exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . fname
$d
call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996', getline(1), s:Mess(s:test))
endfor
***************
*** 131,136 ****
--- 131,154 ----
call delete('XXDfile')
endfor
+ " Test 11: reverse with CR, hex upper, Postscript style with a TAB
+ let s:test += 1
+ call writefile([" 54455354\t610B6364 30390A TESTa\0x0bcd09.\r"], 'Xinput')
+ silent exe '!' . s:xxd_cmd . ' -r -p < Xinput > XXDfile'
+ let blob = readfile('XXDfile', 'B')
+ call assert_equal(0z54455354.610B6364.30390A, blob)
+ call delete('Xinput')
+ call delete('XXDfile')
+
+ " Test 12: reverse with seek
+ let s:test += 1
+ call writefile(["00000000: 54455354\t610B6364 30390A TESTa\0x0bcd09.\r"], 'Xinput')
+ silent exe '!' . s:xxd_cmd . ' -r -seek 5 < Xinput > XXDfile'
+ let blob = readfile('XXDfile', 'B')
+ call assert_equal(0z0000000000.54455354.610B6364.30390A, blob)
+ call delete('Xinput')
+ call delete('XXDfile')
+
" TODO:
" -o -offset
*** ../vim-8.1.0822/src/version.c 2019-01-25 22:29:54.139821894 +0100
--- src/version.c 2019-01-26 14:10:21.939998353 +0100
***************
*** 789,790 ****
--- 789,792 ----
{ /* Add new patch number below this line */
+ /**/
+ 823,
/**/
--
[clop clop]
GUARD #1: Halt! Who goes there?
ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of
Camelot. King of the Britons, defeator of the Saxons, sovereign of
all England!
GUARD #1: Pull the other one!
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|