File: run-test

package info (click to toggle)
patchutils 0.4.2-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,248 kB
  • sloc: ansic: 6,181; sh: 6,143; xml: 2,750; perl: 409; makefile: 248; python: 23
file content (46 lines) | stat: -rwxr-xr-x 664 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

# This is a rediff(1) testcase.
# Test: Adjust offsets correctly


. ${top_srcdir-.}/tests/common.sh

cat << "EOF" > patch.orig
--- /tmp/a	2019-11-28 12:34:20.222622166 +0000
+++ /tmp/b	2019-11-28 12:34:51.932803492 +0000
@@ -1,7 +1,7 @@
 1
-2
+3
 3
 4
 5
 6
-7
+8
EOF

cat << "EOF" > patch.mod
--- /tmp/a	2019-11-28 12:34:20.222622166 +0000
+++ /tmp/b	2019-11-28 12:34:51.932803492 +0000
@@ -1,7 +1,7 @@
 4
 5
 6
-7
+8
EOF

${REDIFF} patch.orig patch.mod > patch-rediffed || exit 1
cmp - patch-rediffed << "EOF" || exit 1
--- /tmp/a	2019-11-28 12:34:20.222622166 +0000
+++ /tmp/b	2019-11-28 12:34:51.932803492 +0000
@@ -4,4 +4,4 @@
 4
 5
 6
-7
+8
EOF