On 5/21/2018 2:53 PM, Jakub Narebski wrote:
+corrupt_data() {
+       file=$1
+       pos=$2
+       data="${3:-\0}"
+       printf "$data" | dd of="$file" bs=1 seek="$pos" conv=notrunc
+}
First, if we do this that way (and not by adding a test helper), the use
of this function should be, I think, protected using appropriate test
prerequisite.  Not everyone has 'dd' tool installed, for example on
MS Windows.

Windows does not, but it is also missing many things this test suite needs. 'dd' is included in the Git for Windows SDK. I rebased this series onto Git for Windows and the tests passed when run in an SDK shell.

Thanks,
-Stolee

Reply via email to