mirror of
https://https.git.savannah.gnu.org/git/patch.git
synced 2026-01-26 16:09:26 +00:00
46 lines
725 B
Plaintext
46 lines
725 B
Plaintext
# Copyright 2024-2025 Free Software Foundation, Inc.
|
|
#
|
|
# Copying and distribution of this file, with or without modification,
|
|
# in any medium, are permitted without royalty provided the copyright
|
|
# notice and this notice are preserved.
|
|
|
|
. $srcdir/test-lib.sh
|
|
|
|
require cat
|
|
use_local_patch
|
|
use_tmpdir
|
|
|
|
# ==============================================================
|
|
|
|
# Patch missing the traditional "--- old\n+++ new\n" header
|
|
|
|
cat > test <<\EOF
|
|
m
|
|
n
|
|
o
|
|
EOF
|
|
|
|
cat > test.diff <<\EOF
|
|
*** a/test Tue Sep 3 17:39:19 2024
|
|
--- b/test Tue Sep 3 17:39:26 2024
|
|
***************
|
|
*** 1 , 3 ****
|
|
m
|
|
! n
|
|
o
|
|
--- 1 , 3 ----
|
|
m
|
|
! o
|
|
o
|
|
EOF
|
|
|
|
check 'patch -p1 -i test.diff' <<\EOF
|
|
patching file test
|
|
EOF
|
|
|
|
check 'cat test' <<\EOF
|
|
m
|
|
o
|
|
o
|
|
EOF
|