diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-05-09 10:46:08 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-05-09 10:46:08 +0000 |
commit | 4fc0fadfaa5dc5a586f231f32cdab8a43906f677 (patch) | |
tree | 8de3bf503c6f989c593c38998c10c0082db3dd4a /Test/D02glob.ztst | |
parent | 627cafd9db0c3d06e4a742345a78b175ab6b5116 (diff) | |
download | zsh-4fc0fadfaa5dc5a586f231f32cdab8a43906f677.tar.gz zsh-4fc0fadfaa5dc5a586f231f32cdab8a43906f677.tar.xz zsh-4fc0fadfaa5dc5a586f231f32cdab8a43906f677.zip |
Add [[:IFS:]] etc. tests.
Diffstat (limited to 'Test/D02glob.ztst')
-rw-r--r-- | Test/D02glob.ztst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index e423176a3..d21aaf8c4 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -323,3 +323,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 |