t4012: Fix invalid call to dd(1)
commitc4f671ad4388985cc233c8ecc048657f6064962a
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 12 May 2012 02:11:45 +0000 (11 21:11 -0500)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 5 Jun 2012 18:44:22 +0000 (5 13:44 -0500)
tree5a81bf4b5132e2031f4cd52c97b5399d00bbf1e6
parent5cdc7d09361c6a6391629e272e15f2cc6b3b6a12
t4012: Fix invalid call to dd(1)

t4012 assumed that it is okay to seek beyond the end of stdin. It is not,
and leads to an access violation (Windows speak for: segmentation fault)
with MinGW's dd.exe iff run in non-verbose mode.

Further, for some reason 'echo X | dd bs=1k seek=1' resulted in 2050 bytes
in this developer's setup instead of 1026.

So let's use a valid technique to generate 1024 NULs followed by X and a
line feed: a good ole' Perl script.

This patch is dedicated to Randal "Merlyn" Schwartz.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
t/t4012-diff-binary.sh