1 |
commit: 16112d6d0340eb6f27a5ef0fa62274a3f90569da |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 24 20:55:26 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 14 16:27:51 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16112d6d |
7 |
|
8 |
eclass/tests/estack_eshopts.sh: Add tests for 'set' variant of eshopt* |
9 |
|
10 |
eclass/tests/estack_eshopts.sh | 23 +++++++++++++++++++++++ |
11 |
1 file changed, 23 insertions(+) |
12 |
|
13 |
diff --git a/eclass/tests/estack_eshopts.sh b/eclass/tests/estack_eshopts.sh |
14 |
index 606a17cfb05..28346c65ec1 100755 |
15 |
--- a/eclass/tests/estack_eshopts.sh |
16 |
+++ b/eclass/tests/estack_eshopts.sh |
17 |
@@ -27,6 +27,29 @@ for arg in nullglob dotglob extglob ; do |
18 |
done |
19 |
done |
20 |
|
21 |
+# test 'set' options |
22 |
+set -f |
23 |
+tbegin "set +f" |
24 |
+s0=$- |
25 |
+t eshopts_push +f |
26 |
+s1=$- |
27 |
+t eshopts_pop |
28 |
+s2=$- |
29 |
+[[ ${s0} == "${s2}" ]] && |
30 |
+[[ ${s1} != *f* ]] |
31 |
+tend $? |
32 |
+ |
33 |
+set +f |
34 |
+tbegin "set -f" |
35 |
+s0=$- |
36 |
+t eshopts_push -f |
37 |
+s1=$- |
38 |
+t eshopts_pop |
39 |
+s2=$- |
40 |
+[[ ${s0} == "${s2}" ]] && |
41 |
+[[ ${s1} == *f* ]] |
42 |
+tend $? |
43 |
+ |
44 |
tbegin "multi push/pop" |
45 |
s0=$(shopt -p) |
46 |
t eshopts_push -s dotglob |