Debian Codegraph @

tests/rediff-inplace1/run-test

raw
1 #!/bin/sh
2
3 # This is a rediff(1) testcase.
4 # Test: --in-place option
5
6 . ${top_srcdir-.}/tests/common.sh
7
8 cat << "EOF" > patch.orig
9 --- file
10 +++ file
11 @@ -3,3 +3,4 @@
12 1
13 2
14 3
15 +4.5
16 EOF
17
18 cat << "EOF" > patch.mod
19 --- file
20 +++ file
21 @@ -3,3 +3,4 @@
22 +4.5
23 EOF
24
25 # Test --in-place
26 ${REDIFF} --in-place patch.orig patch.mod || exit 1
27
28 # Check that patch.mod was modified in place
29 cmp - patch.mod << "EOF" || exit 1
30 --- file
31 +++ file
32 @@ -6,0 +6 @@
33 +4.5
34 EOF