Work around different versions of patch in unit tests
Review Request #10208 — Created Oct. 9, 2018 and submitted
Review request https://reviews.reviewboard.org/r/10164/ landed on
release-4.0.x, but the underlying issue was introduced on release-3.0.x.
This patch is a backport of that patch. The original commit message
follows:We had a unit test that depended on the specific version of
patch
installed. Newer versions of patch will accept a diff that contains no
hunks, whereas older versions will fail with a message saying that the
input contained only garbage.We now have unit tests that check the correct behaviour happens in both
cases by replacing our call topatch
.
Ran unit tests.
- Change Summary:
-
Addressed feedback.
- Commit:
-
7bf4a28967e66e3077c0abf8dd3c1197ba78c1130c3b031e6bf22d35b4b0a983c6bbe1c07c7a3956
Checks run (2 succeeded)
- Commit:
-
0c3b031e6bf22d35b4b0a983c6bbe1c07c7a395648a0ed7183092fe9562dbb8be419404c6030e66b
Checks run (2 succeeded)
- Summary:
-
Work around different versions of patch(1) in unit testsWork around different versions of patch in unit tests
- Description:
-
Review request https://reviews.reviewboard.org/r/10164/ landed on
release-4.0.x, but the underlying issue was introduced on release-3.0.x. This patch is a backport of that patch. The original commit message follows: ~ We had a unit test that depended on the specific version of
patch(1)
~ We had a unit test that depended on the specific version of
patch
installed. Newer versions of patch will accept a diff that contains no hunks, whereas older versions will fail with a message saying that the input contained only garbage. We now have unit tests that check the correct behaviour happens in both
~ cases by replacing our call to patch(1)
.~ cases by replacing our call to patch
.