tests: fix test-patch.t on pickier /bin/sh implementations

Authored by durin42.

Description

tests: fix test-patch.t on pickier /bin/sh implementations

This is a graft of 0b39edeff033 and f44306940c94 from default because
I'm tired of seeing the FreeBSD build be red on stable. See those
revisions for details on what's going on here.

Details

Committed
durin42May 20 2018, 11:05 PM
Parents
rHG3c84493556db: chg: fix an undefined behavior about memcpy
Branches
Unknown
Tags
Unknown