projects
/
gentoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d500fe
)
eclass/tests/estack_eshopts.sh: Add tests for 'set' variant of eshopt*
author
Michał Górny
<mgorny@gentoo.org>
Fri, 24 Mar 2017 20:55:26 +0000
(21:55 +0100)
committer
Michał Górny
<mgorny@gentoo.org>
Fri, 14 Apr 2017 16:27:51 +0000
(18:27 +0200)
eclass/tests/estack_eshopts.sh
patch
|
blob
|
history
diff --git
a/eclass/tests/estack_eshopts.sh
b/eclass/tests/estack_eshopts.sh
index 606a17cfb053e60a4bc8fd5250adab1bc23b9427..28346c65ec13cf98bd4261f2d002197d9498ccd2 100755
(executable)
--- 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