Commit: patch 9.2.0210: tests: Test_xxd tests are failing

0 views
Skip to first unread message

Christian Brabandt

unread,
Mar 20, 2026, 5:32:08 PM (3 days ago) Mar 20
to vim...@googlegroups.com
patch 9.2.0210: tests: Test_xxd tests are failing

Commit: https://github.com/vim/vim/commit/076404ae41c61c7a34ee56a12c9d2dc0c059e959
Author: Muraoka Taro <koron....@gmail.com>
Date: Fri Mar 20 21:19:03 2026 +0000

patch 9.2.0210: tests: Test_xxd tests are failing

Problem: tests: Test_xxd tests are failing, after changing the xxd
manpage (after v9.2.0205)
Solution: Update the manpage, shorten the date and update the example,
regenerate the expected test output, skip the first 30 bytes
for the one of the xxd tests (Muraoka Taro)

Some of the Test_xxd tests depend on the contents of xxd.1. The patch
9.2.0205 changed xxd.1, but the test fixes were insufficient. The test
that dumps the beginning of xxd.1 and the test that reads 13 bytes
starting from byte 0x33 from the beginning were failing.

closes: #19763

Co-authored-by: James McCoy <jame...@debian.org>
Signed-off-by: Muraoka Taro <koron....@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/xxd.1 b/runtime/doc/xxd.1
index e81d8cdee..ce6b24dae 100644
--- a/runtime/doc/xxd.1
+++ b/runtime/doc/xxd.1
@@ -1,4 +1,4 @@
-.TH XXD 1 "March 2026" "Manual page for xxd"
+.TH XXD 1 "Mar 2026" "Manual page for xxd"
.\"
.\" 21st May 1996
.\" Man page author:
@@ -368,17 +368,17 @@ Read single characters from a serial line
.PP
Output in C style include output with terminating zero
.br
- I% echo -e \&"0123456789\&" > digits R
+ I% echo -n \&"0123456789\&" > digits R
.br
I% xxd -i -t digits R
.br
unsigned char digits[] = {
.br
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x0a, 0x00
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
-unsigned int digits_len = 11;
+unsigned int digits_len = 10;
.PP
.SH "RETURN VALUES"
The following error values are returned:
diff --git a/runtime/doc/xxd.man b/runtime/doc/xxd.man
index e5c677ec5..7fe6bca0c 100644
--- a/runtime/doc/xxd.man
+++ b/runtime/doc/xxd.man
@@ -250,13 +250,12 @@ EXAMPLES
% echo -n foo > /dev/term/b

Output in C style include output with terminating zero
- % echo -e "0123456789" > digits
+ % echo -n "0123456789" > digits
% xxd -i -t digits
unsigned char digits[] = {
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x0a,
- 0x00
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
};
- unsigned int digits_len = 11;
+ unsigned int digits_len = 10;

RETURN VALUES
The following error values are returned:
@@ -295,4 +294,4 @@ AUTHOR
<to...@sctnugen.ppp.gu.edu.au> <T.Nu...@sct.gu.edu.au>
Small changes by Bram Moolenaar. Edited by Juergen Weigert.

-Manual page for xxd March 2026 XXD(1)
+Manual page for xxd Mar 2026 XXD(1)
diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim
index 75dbd8bf6..d460315f7 100644
--- a/src/testdir/test_xxd.vim
+++ b/src/testdir/test_xxd.vim
@@ -67,17 +67,19 @@ func Test_xxd()
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
+ " skip the first 30 bytes, it contains the date of the manpage
+ " which can change
let s:test += 1
%d
- exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . man_copy
+ exe '0r! ' . s:xxd_cmd . ' -s 30 -l 120 -ps -c20 ' . man_copy
$d
let expected = [
- \ '2e544820585844203120224d6179203230323422',
- \ '20224d616e75616c207061676520666f72207878',
- \ '64220a2e5c220a2e5c222032317374204d617920',
- \ '313939360a2e5c22204d616e2070616765206175',
- \ '74686f723a0a2e5c2220202020546f6e79204e75',
- \ '67656e74203c746f6e79407363746e7567656e2e']
+ \ '61676520666f7220787864220a2e5c220a2e5c22',
+ \ '2032317374204d617920313939360a2e5c22204d',
+ \ '616e207061676520617574686f723a0a2e5c2220',
+ \ '202020546f6e79204e7567656e74203c746f6e79',
+ \ '407363746e7567656e2e7070702e67752e656475',
+ \ '2e61753e203c542e4e7567656e74407363742e67']
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))

" Test 6: Print the date from xxd.1
diff --git a/src/version.c b/src/version.c
index 820096693..d95613190 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 210,
/**/
209,
/**/
Reply all
Reply to author
Forward
0 new messages