From 16112d6d0340eb6f27a5ef0fa62274a3f90569da Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 24 Mar 2017 21:55:26 +0100 Subject: eclass/tests/estack_eshopts.sh: Add tests for 'set' variant of eshopt* --- eclass/tests/estack_eshopts.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/eclass/tests/estack_eshopts.sh b/eclass/tests/estack_eshopts.sh index 606a17cfb053..28346c65ec13 100755 --- a/eclass/tests/estack_eshopts.sh +++ b/eclass/tests/estack_eshopts.sh @@ -27,6 +27,29 @@ for arg in nullglob dotglob extglob ; do done done +# test 'set' options +set -f +tbegin "set +f" +s0=$- +t eshopts_push +f +s1=$- +t eshopts_pop +s2=$- +[[ ${s0} == "${s2}" ]] && +[[ ${s1} != *f* ]] +tend $? + +set +f +tbegin "set -f" +s0=$- +t eshopts_push -f +s1=$- +t eshopts_pop +s2=$- +[[ ${s0} == "${s2}" ]] && +[[ ${s1} == *f* ]] +tend $? + tbegin "multi push/pop" s0=$(shopt -p) t eshopts_push -s dotglob -- cgit v1.2.3-65-gdbad