[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH 1/2] eclass/tests/estack_eshopts.sh: Add tests for 'set' variant of eshopt*
From: Michał Górny <mgorny () gentoo ! org>
Date: 2017-03-24 21:01:56
Message-ID: 20170324210157.27562-1-mgorny () gentoo ! org
[Download RAW message or body]
---
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
--
2.12.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic