File: run-test

package info (click to toggle)
patchutils 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,752 kB
  • ctags: 391
  • sloc: sh: 7,174; ansic: 6,052; xml: 2,395; perl: 409; makefile: 269
file content (33 lines) | stat: -rwxr-xr-x 454 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

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

mkdir dir
cat << EOF > dir/file.orig
a
EOF
cat << EOF > dir/file
1
2
3
EOF
cat << EOF > dir/xyzzy.orig
a
b
c
EOF
cat << EOF > dir/xyzzy
a
b
d
EOF
# "gendiff dir .orig", but without requiring gendiff:
( for f in file xyzzy
  do
    printf "diff -up dir/$f.orig dir/$f\n"
    diff -up dir/$f.orig dir/$f
  done) > patch1

${INTERDIFF} patch1 patch1 2>errors > patch1-2 || exit 1
[ -s errors ] && exit 1
exit 0