From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A49CC139694 for ; Fri, 24 Mar 2017 21:02:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 342F521C170; Fri, 24 Mar 2017 21:02:08 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E73FE21C12C for ; Fri, 24 Mar 2017 21:02:07 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id E72BE341664; Fri, 24 Mar 2017 21:02:05 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: base-system@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 1/2] eclass/tests/estack_eshopts.sh: Add tests for 'set' variant of eshopt* Date: Fri, 24 Mar 2017 22:01:56 +0100 Message-Id: <20170324210157.27562-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.12.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 597c8cef-327a-4bb0-b623-72f50668230e X-Archives-Hash: 6697a40fcd33aeed73039af020535a3e --- 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