about summary refs log tree commit diff
path: root/Test/D02glob.ztst
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-06-21 01:53:22 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-07-05 04:57:28 +0000
commit8468f24af48154e01869d5998160eb3903ad0e43 (patch)
treebf24a57f2f94ffb7879f855cb1b6c3a33c6b4360 /Test/D02glob.ztst
parenta7d5d239e6ab729515083a88cfaf955e078c1685 (diff)
downloadzsh-8468f24af48154e01869d5998160eb3903ad0e43.tar.gz
zsh-8468f24af48154e01869d5998160eb3903ad0e43.tar.xz
zsh-8468f24af48154e01869d5998160eb3903ad0e43.zip
38728: Tests: Add tests for the ':a' and ':A' modifiers.
Diffstat (limited to 'Test/D02glob.ztst')
-rw-r--r--Test/D02glob.ztst25
1 files changed, 24 insertions, 1 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index a6b704a8e..7befbc21f 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