diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-04-15 22:00:53 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-04-15 22:00:53 +0000 |
commit | 07ef1b8e3ea6a0702ebe96c854e9142540630f33 (patch) | |
tree | 0a2a345db9adc413704fe73e9b1e807676d4f051 /Test | |
parent | 0e719c892873535ad26868ef958db24784444866 (diff) | |
download | zsh-07ef1b8e3ea6a0702ebe96c854e9142540630f33.tar.gz zsh-07ef1b8e3ea6a0702ebe96c854e9142540630f33.tar.xz zsh-07ef1b8e3ea6a0702ebe96c854e9142540630f33.zip |
Merge from trunk of workers/{21211,21317,22557}.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/D02glob.ztst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index e423176a3..409a73e30 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -280,6 +280,10 @@ 0:Globbing used recursively (inside e glob qualifier) >a a b b c c + print glob.tmp/*/*(e:'reply=( glob.tmp/**/*([1]) )'::t) +0:Recursive globbing used recursively (inside e glob qualifier) +>a a a a a a a + print glob.tmp/**/(:h) 0:Head modifier >. glob.tmp glob.tmp glob.tmp glob.tmp glob.tmp/dir3 @@ -323,3 +327,28 @@ print glob.tmp/ra=1.0_et=3.5/??? 0:Bug with intermediate paths with plain strings but tokenized characters >glob.tmp/ra=1.0_et=3.5/foo + + doesmatch() { + setopt localoptions extendedglob + print -n $1 $2\ + if [[ $1 = $~2 ]]; then print yes; else print no; fi; + } + doesmatch MY_IDENTIFIER '[[:IDENT:]]##' + doesmatch YOUR:IDENTIFIER '[[:IDENT:]]##' + IFS=$'\n' doesmatch $'\n' '[[:IFS:]]' + IFS=' ' doesmatch $'\n' '[[:IFS:]]' + IFS=':' doesmatch : '[[:IFSSPACE:]]' + IFS=' ' doesmatch ' ' '[[:IFSSPACE:]]' + WORDCHARS="" doesmatch / '[[:WORD:]]' + WORDCHARS="/" doesmatch / '[[:WORD:]]' +0:Named character sets handled internally +>MY_IDENTIFIER [[:IDENT:]]## yes +>YOUR:IDENTIFIER [[:IDENT:]]## no +> +> [[:IFS:]] yes +> +> [[:IFS:]] no +>: [[:IFSSPACE:]] no +> [[:IFSSPACE:]] yes +>/ [[:WORD:]] no +>/ [[:WORD:]] yes |