summaryrefslogtreecommitdiff
path: root/tests/merge
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@gnu.org>2018-02-07 12:10:41 +0100
committerAndreas Gruenbacher <agruen@gnu.org>2018-02-07 13:19:24 +0100
commitf6bc5b14bd193859851d15a049bafb1007acd288 (patch)
tree7e76f6d0de159d5edab18f88ee83124ba84680d3 /tests/merge
parent3bbebbb29f6fbbf2988b9f2e75695b7c0b1f1c9b (diff)
downloadpatch-f6bc5b14bd193859851d15a049bafb1007acd288.tar.gz
Test suite compatibility fixes
* tests/crlf-handling, tests/git-cleanup, tests/test-lib.sh: Use printf instead of echo -e / echo -n for compatibility with systems that don't support these echo options. * tests/merge: Minor other cleanups.
Diffstat (limited to 'tests/merge')
-rw-r--r--tests/merge18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/merge b/tests/merge
index 22d787b..b628891 100644
--- a/tests/merge
+++ b/tests/merge
@@ -30,30 +30,28 @@ x2() {
while test $# -gt 0 && test "$1" != -- ; do
echo "$1"
shift
- done > a.sed
- echo "$body" | sed -f a.sed > b
+ done > b.sed
+ echo "$body" | sed -f b.sed > b
shift
while test $# -gt 0 ; do
echo "$1"
shift
- done > b.sed
- echo "$body" | sed -f b.sed > c
- rm -f a.sed b.sed
+ done > c.sed
+ echo "$body" | sed -f c.sed > c
+ rm -f b.sed c.sed
output=`diff -u a b | patch $ARGS -f c`
status=$?
echo "$output" | sed -e '/^$/d' -e '/^patching file c$/d'
cat c
- test $status == 0 || echo "Status: $status"
+ test $status = 0 || echo "Status: $status"
}
x() {
- ARGS="$ARGS --merge" x2 "$@"
+ ARGS="--merge" x2 "$@"
echo
- ARGS="$ARGS --merge=diff3" x2 "$@"
+ ARGS="--merge=diff3" x2 "$@"
}
-unset ARGS
-
# ==============================================================
check 'x 3' <<EOF