diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-03-24 21:55:26 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-04-14 18:27:51 +0200 |
commit | 16112d6d0340eb6f27a5ef0fa62274a3f90569da (patch) | |
tree | 1a35b1cf8b9184c59689637a73a771b726219ec7 /eclass/tests | |
parent | toolchain-glibc.eclass: Replace evar_* with local variables (diff) | |
download | gentoo-16112d6d0340eb6f27a5ef0fa62274a3f90569da.tar.gz gentoo-16112d6d0340eb6f27a5ef0fa62274a3f90569da.tar.bz2 gentoo-16112d6d0340eb6f27a5ef0fa62274a3f90569da.zip |
eclass/tests/estack_eshopts.sh: Add tests for 'set' variant of eshopt*
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/estack_eshopts.sh | 23 |
1 files changed, 23 insertions, 0 deletions
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 |