>From 93673d1bc2af38dec512b05bc6d9262c6b45b5ad Mon Sep 17 00:00:00 2001 From: Denys Zagorui Date: Fri, 10 Mar 2017 22:59:48 +0200 Subject: [PATCH] tests/zdiff: add diff from busybox compatibility. Diff from busybox has another output than diff from diffutils Signed-off-by: Denys Zagorui Upstream-Status: Pending --- tests/zdiff | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/zdiff b/tests/zdiff index 7ed2f34..2567d1a 100755 --- a/tests/zdiff +++ b/tests/zdiff @@ -24,12 +24,13 @@ echo a > a || framework_failure_ echo b > b || framework_failure_ gzip a b || framework_failure_ -cat < exp -1c1 -< a ---- -> b -EOF +diff -v 2>&1 > /dev/null | grep BusyBox + +if [ $? == 0 ];then + echo -e '--- /dev/fd/5\n+++ -\n@@ -1 +1 @@\n-a\n+b' > exp +else + echo -e '1c1\n< a\n---\n> b' >exp +fi fail=0 returns_ 1 zdiff a.gz b.gz > out 2>&1 || fail=1 -- 1.9.1