1 |
--- |
2 |
eclass/tests/estack_eshopts.sh | 23 +++++++++++++++++++++++ |
3 |
1 file changed, 23 insertions(+) |
4 |
|
5 |
diff --git a/eclass/tests/estack_eshopts.sh b/eclass/tests/estack_eshopts.sh |
6 |
index 606a17cfb053..28346c65ec13 100755 |
7 |
--- a/eclass/tests/estack_eshopts.sh |
8 |
+++ b/eclass/tests/estack_eshopts.sh |
9 |
@@ -27,6 +27,29 @@ for arg in nullglob dotglob extglob ; do |
10 |
done |
11 |
done |
12 |
|
13 |
+# test 'set' options |
14 |
+set -f |
15 |
+tbegin "set +f" |
16 |
+s0=$- |
17 |
+t eshopts_push +f |
18 |
+s1=$- |
19 |
+t eshopts_pop |
20 |
+s2=$- |
21 |
+[[ ${s0} == "${s2}" ]] && |
22 |
+[[ ${s1} != *f* ]] |
23 |
+tend $? |
24 |
+ |
25 |
+set +f |
26 |
+tbegin "set -f" |
27 |
+s0=$- |
28 |
+t eshopts_push -f |
29 |
+s1=$- |
30 |
+t eshopts_pop |
31 |
+s2=$- |
32 |
+[[ ${s0} == "${s2}" ]] && |
33 |
+[[ ${s1} == *f* ]] |
34 |
+tend $? |
35 |
+ |
36 |
tbegin "multi push/pop" |
37 |
s0=$(shopt -p) |
38 |
t eshopts_push -s dotglob |
39 |
-- |
40 |
2.12.1 |