diff options
Diffstat (limited to 't')
| -rwxr-xr-x | t/t4100-apply-stat.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t4100-apply-stat.sh b/t/t4100-apply-stat.sh index 146e73d8f5..a5664f3eb3 100755 --- a/t/t4100-apply-stat.sh +++ b/t/t4100-apply-stat.sh @@ -38,4 +38,17 @@ incomplete (1) incomplete (2) EOF +test_expect_success 'applying a hunk header which overflows fails' ' + cat >patch <<-\EOF && + diff -u a/file b/file + --- a/file + +++ b/file + @@ -98765432109876543210 +98765432109876543210 @@ + -a + +b + EOF + test_must_fail git apply patch 2>err && + echo "error: corrupt patch at line 4" >expect && + test_cmp expect err +' test_done |
