[patch] zip tests
Denys Vlasenko
vda.linux at googlemail.com
Tue May 6 05:21:24 PDT 2008
On Sunday 04 May 2008 11:28, Cristian Ionescu-Idbohrn wrote:
> Moves common parts of the tests to compressfuncts.sh (new).
Cannot take it as a whole:
[ "$ECHO" ] || . testing.sh
I was told that nothing says that . operator shall search
current directory first. If you mean it, use ". ./file"
explicitly.
local xtrace
xtrace=$(set -o | sed -rne 's/xtrace[[:space:]]+([^[:space:]]+)/\1/p')
[ "$xtrace" = off ] || set +x
eval "$2" >t_actual 2>&1 || {
echo "$1: FAIL (eval)"
}
[ "$xtrace" = off ] || set -x
if $ECHO -ne "$expected" | cmp - t_actual; then
echo "$1: PASS"
else
echo "$1: FAIL"
fi
I have no idea what this xtrace thing can be.
Why is it needed? Can you explain it in the comment?
+wdir=testdir
-cd testdir || { echo "cannot cd testdir!"; exit 1; }
+cd $wdir || { echo "cannot cd $wdir!"; exit 1; }
Why is this useful?
-prep; check "$unpack: doesnt exist" "${bb}$unpack z t1.$ext; echo \$?; cat t1"
+prep
+check "$unpack: doesnt exist" "set +e;$bb_app z t1.$ext; echo \$?; cat t1"
The part which splits "command; command" into several lines is ok.
Do you want to resend it as separate patch?
(If these changes were sent as a few patches instead of all-in-one,
I would already applied that one)
> Adds a new test: zcat.tests.
Depends on compressfuncts.sh. Let's deal with that one first.
--
vda
More information about the busybox
mailing list