From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2664 invoked by alias); 21 Jun 2016 01:53:29 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38728 Received: (qmail 1426 invoked from network); 21 Jun 2016 01:53:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH v2 1/3] Tests: Add tests for the ':a' and ':A' modifiers. Date: Tue, 21 Jun 2016 01:53:22 +0000 Message-Id: <1466474004-4669-1-git-send-email-danielsh@tarsus.local2> X-Mailer: git-send-email 2.1.4 In-Reply-To: <20160613085218.GA9572@tarsus.local2> References: <20160613085218.GA9572@tarsus.local2> --- Differences to v1 of this series: * Added dependency on CHASEDOTS (please review); docs updated accordingly * Tests updated Cheers, daniel Test/D02glob.ztst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index a6b704a..7befbc2 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -654,4 +654,27 @@ [[ "z" != [$~cset] ]] || print Fail 4 [[ "1" = [$~cset] ]] || print Fail 5 [[ "b" != [$~cset] ]] || print Fail 6 -0:character set specified as active variabe +0:character set specified as active variable + + () { print -l -- $@:a } / /..{,/} /1 /nonexistent/..{,/} /deeper/nonexistent/..{,/} +0:modifier ':a' doesn't require existence +>/ +>/ +>/ +>/1 +>/ +>/ +>/deeper +>/deeper + + () { set -- ${PWD}/$^@; print -l -- $@:A } glob.tmp/nonexistent/foo/bar/baz +0:modifier ':A' doesn't require existence +*>*/glob.tmp/nonexistent/foo/bar/baz + + ln -s dir3/subdir glob.tmp/link + () { + print ${1:A} | grep glob.tmp + } glob.tmp/link/../../hello + rm glob.tmp/link +0:modifier ':A' resolves '..' components before symlinks +# There should be no output