diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-07-11 15:36:37 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-07-11 15:36:37 +0000 |
commit | 0a22eb0e0c76892ff0397996f451e9bf78dd3d02 (patch) | |
tree | de3f0518d47f18071ce95735736b3036010a49d5 | |
parent | 4a67f2479892fda348546404216270aaaff523ea (diff) | |
download | zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.gz zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.xz zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.zip |
22546: fix {myfd}>... bug and tweak tests
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/parse.c | 2 | ||||
-rw-r--r-- | Test/A04redirect.ztst | 11 | ||||
-rw-r--r-- | Test/D07multibyte.ztst | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index a51b5909b..6dd0cf4b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-11 Peter Stephenson <pws@csr.com> + + * 22546: Src/parse.c, Test/A04redirect.ztst, + Test/D07multibyte.ztst: fix bug with {myfd}>... redirection + syntax introduced in 22544 and tweak tests. + 2006-07-10 Peter Stephenson <pws@csr.com> * 22544: README, Doc/Zsh/options.yo, Src/builtin.c, Src/glob.c, diff --git a/Src/parse.c b/Src/parse.c index 17a24f2e9..7063599b4 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1603,7 +1603,7 @@ par_simple(int *complex, int nr) if (*ptr == Outbrace && ptr > tokstr + 1) { - if (itype_end(tokstr, IIDENT, 0) >= ptr - 1) + if (itype_end(tokstr+1, IIDENT, 0) >= ptr - 1) { char *toksave = tokstr; char *idstring = dupstrpfx(tokstr+1, eptr-tokstr-1); diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index 06c380bdb..104ed433e 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -240,10 +240,15 @@ <input >input + myfd= exec {myfd}>logfile - print This is my logfile. >&$myfd - print Examining contents of logfile... - cat logfile + if [[ -z $myfd ]]; then + print "Ooops, failed to set myfd to a file descriptor." >&2 + else + print This is my logfile. >&$myfd + print Examining contents of logfile... + cat logfile + fi 0:Using {fdvar}> syntax to open a new file descriptor >Examining contents of logfile... >This is my logfile. diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 85aa24ade..20c967540 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -12,7 +12,7 @@ fi done if [[ -z $mb_ok ]]; then - ZTST_unimplemented="no UTF-8 locale or multibyte mode is not implemnted" + ZTST_unimplemented="no UTF-8 locale or multibyte mode is not implemented" else print Testing multibyte with locale $LANG >&8 fi |