diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-12-17 05:06:52 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-12-17 05:06:52 +0000 |
commit | 9acd0297715891bdef127619a924e7a48e8a7c8e (patch) | |
tree | 06271b282efe9c937e9ef708938a9e60459ea666 /eclass | |
parent | keep die message updates in eshopts_{push,pop} to $FUNCNAME (diff) | |
download | gentoo-2-9acd0297715891bdef127619a924e7a48e8a7c8e.tar.gz gentoo-2-9acd0297715891bdef127619a924e7a48e8a7c8e.tar.bz2 gentoo-2-9acd0297715891bdef127619a924e7a48e8a7c8e.zip |
check return values of all push/pop calls
Diffstat (limited to 'eclass')
-rwxr-xr-x | eclass/tests/eutils:estack.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/eclass/tests/eutils:estack.sh b/eclass/tests/eutils:estack.sh index c180d1344022..89a443667cd9 100755 --- a/eclass/tests/eutils:estack.sh +++ b/eclass/tests/eutils:estack.sh @@ -12,31 +12,39 @@ tend $? tbegin "simple push/pop" estack_push ttt 1 +pu=$? estack_pop ttt +po=$? +[[ ${pu}${po} == "00" ]] tend $? tbegin "simple push/pop var" estack_push xxx "boo ga boo" +pu=$? estack_pop xxx i -[[ $? -eq 0 ]] && [[ ${i} == "boo ga boo" ]] +po=$? +[[ ${pu}${po} == "00" ]] && [[ ${i} == "boo ga boo" ]] tend $? tbegin "multi push/pop" estack_push yyy {1..10} +pu=$? i=0 while estack_pop yyy ; do : $(( i++ )) done -[[ ${i} -eq 10 ]] +[[ ${pu} -eq 0 && ${i} -eq 10 ]] tend $? tbegin "umask push/pop" u0=$(umask) eumask_push 0000 +pu=$? u1=$(umask) eumask_pop +po=$? u2=$(umask) -[[ ${u0}:${u1}:${u2} == "${u0}:0000:${u0}" ]] +[[ ${pu}${po}:${u0}:${u1}:${u2} == "00:${u0}:0000:${u0}" ]] tend $? texit |