1
# Copyright (C) 2009 Free Software Foundation, Inc.
3
# Copying and distribution of this file, with or without modification,
4
# in any medium, are permitted without royalty provided the copyright
5
# notice and this notice are preserved.
14
# ==============================================================
16
# Regression test for an off-by-one error:
18
# Date: Sun, 26 Aug 2007 13:50:45 +0200
19
# From: Jim Meyering <jim@meyering.net>
21
# The problem arises when the input is a context diff and the second
22
# byte on a line of context is not a space or tab.
23
# Patch then happily gobbles/ignores that bogus byte and outputs
24
# the rest of the line with an additional (NUL) byte at the end.
43
check 'patch a < ab.diff || echo "Status: $?"' <<EOF
46
1 out of 1 hunk FAILED -- saving rejects to file a.rej
50
check 'cat -A a.rej' <<EOF