* 4.0.1 - arguments test fails @ 2001-06-01 22:28 Andrej Borsenkow 2001-06-02 0:04 ` Peter Stephenson 2001-06-06 9:21 ` PATCH: " Sven Wischnowsky 0 siblings, 2 replies; 11+ messages in thread From: Andrej Borsenkow @ 2001-06-01 22:28 UTC (permalink / raw) To: ZSH Workers Mailing List /tools/src/zsh-4.0.x/Test/Y03arguments.ztst: starting. *** /tmp/zsh.ztst.out.959 Sat Jun 2 02:25:33 2001 --- /tmp/zsh.ztst.tout.959 Sat Jun 2 02:25:33 2001 *************** *** 1,4 **** line: {tst -}{} MESSAGE:{arg} - DESCRIPTION:{option} - NO:{-x} --- 1,2 ---- Test /tools/src/zsh-4.0.x/Test/Y03arguments.ztst failed: output differs from expected as shown above for: tst_arguments '-x' ':arg:' comptest $'tst -\t' Was testing: argument beginning with minus /tools/src/zsh-4.0.x/Test/Y03arguments.ztst: test failed. gmake[1]: [check] Error 1 (ignored) rm -rf Modules .zcompdump gmake[1]: Leaving directory `/u3/u1/build/zsh-4.0.x/Test' -andrej ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 4.0.1 - arguments test fails 2001-06-01 22:28 4.0.1 - arguments test fails Andrej Borsenkow @ 2001-06-02 0:04 ` Peter Stephenson 2001-06-02 1:07 ` Bart Schaefer 2001-06-02 3:52 ` Bart Schaefer 2001-06-06 9:21 ` PATCH: " Sven Wischnowsky 1 sibling, 2 replies; 11+ messages in thread From: Peter Stephenson @ 2001-06-02 0:04 UTC (permalink / raw) To: Zsh hackers list > Test /tools/src/zsh-4.0.x/Test/Y03arguments.ztst failed: output differs > from expected as shown above for: > tst_arguments '-x' ':arg:' > comptest $'tst -\t' I knew there was something I'd forgotten before releasing the shell --- testing it worked. Oh, well, it'll see if anyone's awake out there. This is the sort of thing that happens with _arguments and its friends all the time, it's just that some *other* time would have been better. -- Peter Stephenson <pws@pwstephenson.fsnet.co.uk> Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 4.0.1 - arguments test fails 2001-06-02 0:04 ` Peter Stephenson @ 2001-06-02 1:07 ` Bart Schaefer 2001-06-02 3:52 ` Bart Schaefer 1 sibling, 0 replies; 11+ messages in thread From: Bart Schaefer @ 2001-06-02 1:07 UTC (permalink / raw) To: Peter Stephenson, Zsh hackers list On Jun 2, 1:04am, Peter Stephenson wrote: } } This is the sort of thing that happens with _arguments and its friends all } the time, it's just that some *other* time would have been better. I backed out 14607 and then all the tests pass. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 4.0.1 - arguments test fails 2001-06-02 0:04 ` Peter Stephenson 2001-06-02 1:07 ` Bart Schaefer @ 2001-06-02 3:52 ` Bart Schaefer 1 sibling, 0 replies; 11+ messages in thread From: Bart Schaefer @ 2001-06-02 3:52 UTC (permalink / raw) To: Zsh hackers list On Jun 2, 1:04am, Peter Stephenson wrote: } } I knew there was something I'd forgotten before releasing the shell --- } testing it worked. Oh, well, it'll see if anyone's awake out there. Of course, since you didn't make a release and then immediately leave town, Sven had to fill the gap by introducing a bug and then leaving town. We do have a history of making a release and then quickly making another with only the dates changed (not the version). Unfortunately I can't tell whether this test failure is an actual bug, or an intentional change in behavior. The next test chunk fails as well: *** /tmp/zsh.ztst.out.28338 Fri Jun 1 20:47:45 2001 --- /tmp/zsh.ztst.tout.28338 Fri Jun 1 20:47:46 2001 *************** *** 1,6 **** line: {tst -o }{} ! line: {tst -o }{} ! DESCRIPTION:{optarg} ! NO:{oa} ! DESCRIPTION:{arg1} ! NO:{a1} --- 1,2 ---- line: {tst -o }{} ! line: {tst -o oa }{} Test ../../zsh-4.0/Test/Y03arguments.ztst failed: output differs from expected as shown above for: tst_arguments '-o::optarg:(oa)' ':arg1:(a1)' comptest $'tst -o\t\t' Was testing: optional option argument -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net ^ permalink raw reply [flat|nested] 11+ messages in thread
* PATCH: Re: 4.0.1 - arguments test fails 2001-06-01 22:28 4.0.1 - arguments test fails Andrej Borsenkow 2001-06-02 0:04 ` Peter Stephenson @ 2001-06-06 9:21 ` Sven Wischnowsky 2001-06-06 9:51 ` Peter Stephenson 1 sibling, 1 reply; 11+ messages in thread From: Sven Wischnowsky @ 2001-06-06 9:21 UTC (permalink / raw) To: zsh-workers Andrej Borsenkow wrote: > /tools/src/zsh-4.0.x/Test/Y03arguments.ztst: starting. > *** /tmp/zsh.ztst.out.959 Sat Jun 2 02:25:33 2001 > --- /tmp/zsh.ztst.tout.959 Sat Jun 2 02:25:33 2001 > *************** > *** 1,4 **** > line: {tst -}{} > MESSAGE:{arg} > - DESCRIPTION:{option} > - NO:{-x} > --- 1,2 ---- > Test /tools/src/zsh-4.0.x/Test/Y03arguments.ztst failed: output differs > from expected as shown above for: > tst_arguments '-x' ':arg:' > comptest $'tst -\t' > Was testing: argument beginning with minus > /tools/src/zsh-4.0.x/Test/Y03arguments.ztst: test failed. > gmake[1]: [check] Error 1 (ignored) > rm -rf Modules .zcompdump > gmake[1]: Leaving directory `/u3/u1/build/zsh-4.0.x/Test' Oh boy, am I ashamed. The patch makes the test suite happy again and also fixes Peter's problem with history/fc. It looks big, but that's mostly re-indentation. There were basically two problems: in the test suite, my bad patch kept multiple actions from being tried -- the test to keep it from trying the same action more than once was placed wrongly -- and if we haven't an option on the command line, we should try to complete options, even if we've already tried an action. Oh boy, am I ashamed. I'm going to commit this now, do I have to commit it somewhere else, too (because of branching or something)? I'm soo ashamed. I'll better creep back into my hole in the ground now... Bye Sven Index: Completion/Base/Utility/_arguments =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_arguments,v retrieving revision 1.7 diff -u -r1.7 _arguments --- Completion/Base/Utility/_arguments 2001/06/01 14:29:11 1.7 +++ Completion/Base/Utility/_arguments 2001/06/06 09:17:26 @@ -186,6 +186,8 @@ esac done +[[ "$PREFIX" = [-+] ]] && alwopt=arg + zstyle -s ":completion:${curcontext}:options" auto-description autod if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then @@ -227,106 +229,108 @@ while true; do while _tags; do anum=1 - while [[ anum -le $#descrs ]]; do - - action="$actions[anum]" - descr="$descrs[anum]" - subc="$subcs[anum++]" + if [[ -z "$tried" ]]; then + while [[ anum -le $#descrs ]]; do - if [[ -z "$tried" ]] && { [[ -n "$matched" ]] || _requested "$subc" }; then + action="$actions[anum]" + descr="$descrs[anum]" + subc="$subcs[anum++]" - curcontext="${oldcontext%:*}:$subc" + if [[ -n "$matched" ]] || _requested "$subc"; then - _description "$subc" expl "$descr" + curcontext="${oldcontext%:*}:$subc" - if [[ "$action" = \=\ * ]]; then - action="$action[3,-1]" - words=( "$subc" "$words[@]" ) - (( CURRENT++ )) - fi + _description "$subc" expl "$descr" - if [[ "$action" = -\>* ]]; then - action="${${action[3,-1]##[ ]#}%%[ ]#}" - if (( ! $state[(I)$action] )); then - comparguments -W line opt_args - state=( "$state[@]" "$action" ) - if [[ -n "$usecc" ]]; then - curcontext="${oldcontext%:*}:$subc" - else - context=( "$context[@]" "$subc" ) - fi - compstate[restore]='' - aret=yes + if [[ "$action" = \=\ * ]]; then + action="$action[3,-1]" + words=( "$subc" "$words[@]" ) + (( CURRENT++ )) fi - else - if [[ -z "$local" ]]; then - local line - typeset -A opt_args - local=yes - fi - comparguments -W line opt_args + if [[ "$action" = -\>* ]]; then + action="${${action[3,-1]##[ ]#}%%[ ]#}" + if (( ! $state[(I)$action] )); then + comparguments -W line opt_args + state=( "$state[@]" "$action" ) + if [[ -n "$usecc" ]]; then + curcontext="${oldcontext%:*}:$subc" + else + context=( "$context[@]" "$subc" ) + fi + compstate[restore]='' + aret=yes + fi + else + if [[ -z "$local" ]]; then + local line + typeset -A opt_args + local=yes + fi - if [[ "$action" = \ # ]]; then + comparguments -W line opt_args - # An empty action means that we should just display a message. + if [[ "$action" = \ # ]]; then - _message "$descr" - mesg=yes - tried=yes + # An empty action means that we should just display a message. - elif [[ "$action" = \(\(*\)\) ]]; then + _message "$descr" + mesg=yes + tried=yes + alwopt=${alwopt:-yes} + elif [[ "$action" = \(\(*\)\) ]]; then - # ((...)) contains literal strings with descriptions. + # ((...)) contains literal strings with descriptions. - eval ws\=\( "${action[3,-3]}" \) + eval ws\=\( "${action[3,-3]}" \) - _describe -t "$subc" "$descr" ws -M "$matcher" "$subopts[@]" || - alwopt=${alwopt:-yes} - tried=yes + _describe -t "$subc" "$descr" ws -M "$matcher" "$subopts[@]" || + alwopt=${alwopt:-yes} + tried=yes - elif [[ "$action" = \(*\) ]]; then + elif [[ "$action" = \(*\) ]]; then - # Anything inside `(...)' is added directly. + # Anything inside `(...)' is added directly. - eval ws\=\( "${action[2,-2]}" \) + eval ws\=\( "${action[2,-2]}" \) - _all_labels "$subc" expl "$descr" compadd "$subopts[@]" -a - ws || - alwopt=${alwopt:-yes} - tried=yes - elif [[ "$action" = \{*\} ]]; then + _all_labels "$subc" expl "$descr" compadd "$subopts[@]" -a - ws || + alwopt=${alwopt:-yes} + tried=yes + elif [[ "$action" = \{*\} ]]; then - # A string in braces is evaluated. + # A string in braces is evaluated. - while _next_label "$subc" expl "$descr"; do - eval "$action[2,-2]" && ret=0 - done - (( ret )) && alwopt=${alwopt:-yes} - tried=yes - elif [[ "$action" = \ * ]]; then + while _next_label "$subc" expl "$descr"; do + eval "$action[2,-2]" && ret=0 + done + (( ret )) && alwopt=${alwopt:-yes} + tried=yes + elif [[ "$action" = \ * ]]; then - # If the action starts with a space, we just call it. + # If the action starts with a space, we just call it. - eval "action=( $action )" - while _next_label "$subc" expl "$descr"; do - "$action[@]" && ret=0 - done - (( ret )) && alwopt=${alwopt:-yes} - tried=yes - else + eval "action=( $action )" + while _next_label "$subc" expl "$descr"; do + "$action[@]" && ret=0 + done + (( ret )) && alwopt=${alwopt:-yes} + tried=yes + else - # Otherwise we call it with the description-arguments. + # Otherwise we call it with the description-arguments. - eval "action=( $action )" - while _next_label "$subc" expl "$descr"; do - "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}" && ret=0 - done - (( ret )) && alwopt=${alwopt:-yes} - tried=yes + eval "action=( $action )" + while _next_label "$subc" expl "$descr"; do + "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}" && ret=0 + done + (( ret )) && alwopt=${alwopt:-yes} + tried=yes + fi fi fi - fi - done + done + fi if [[ -z "$hasopts" && -z "$matched" && ( -z "$tried" || -n "$alwopt" ) && -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: Re: 4.0.1 - arguments test fails 2001-06-06 9:21 ` PATCH: " Sven Wischnowsky @ 2001-06-06 9:51 ` Peter Stephenson 2001-06-06 10:18 ` Branch patches (Re: PATCH: Re: 4.0.1 - arguments test fails) Bart Schaefer 2001-06-06 10:51 ` PATCH: Re: 4.0.1 - arguments test fails Sven Wischnowsky 0 siblings, 2 replies; 11+ messages in thread From: Peter Stephenson @ 2001-06-06 9:51 UTC (permalink / raw) To: Zsh hackers list Sven Wischnowsky wrote: > I'm going to commit this now, do I have to commit it somewhere else, too > (because of branching or something)? Yes, you have to cvs -d '<the-sourceforge-stuff>' checkout -r zsh-4_0-patches zsh and apply it. In general they shouldn't go straight onto the 4.0 branch until after a bit of testing, but this one is presumably an improvement. Bart's suggestion is someone (probably me, it looks like) applies all the 4.0 changes, but I'm not enthusiastic about doing it all myself at the moment. -- Peter Stephenson <pws@csr.com> Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ********************************************************************** ^ permalink raw reply [flat|nested] 11+ messages in thread
* Branch patches (Re: PATCH: Re: 4.0.1 - arguments test fails) 2001-06-06 9:51 ` Peter Stephenson @ 2001-06-06 10:18 ` Bart Schaefer 2001-06-06 10:51 ` PATCH: Re: 4.0.1 - arguments test fails Sven Wischnowsky 1 sibling, 0 replies; 11+ messages in thread From: Bart Schaefer @ 2001-06-06 10:18 UTC (permalink / raw) To: Zsh hackers list On Jun 6, 10:51am, Peter Stephenson wrote: } } In general they shouldn't go straight onto the 4.0 branch until after a bit } of testing, but this one is presumably an improvement. Bart's suggestion } is someone (probably me, it looks like) applies all the 4.0 changes, but } I'm not enthusiastic about doing it all myself at the moment. Actually my suggestion would be that someone (probably you, but we could divide up responsibility, e.g., could be Sven for the completion system) give an "OK, go ahead" before patches were merged from development to stable -- but that doesn't mean it's essential that the "moderator" do the actual patching. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: Re: 4.0.1 - arguments test fails 2001-06-06 9:51 ` Peter Stephenson 2001-06-06 10:18 ` Branch patches (Re: PATCH: Re: 4.0.1 - arguments test fails) Bart Schaefer @ 2001-06-06 10:51 ` Sven Wischnowsky 2001-06-06 10:58 ` Bart Schaefer 2001-06-06 11:00 ` Andrej Borsenkow 1 sibling, 2 replies; 11+ messages in thread From: Sven Wischnowsky @ 2001-06-06 10:51 UTC (permalink / raw) To: zsh-workers Peter Stephenson wrote: > Sven Wischnowsky wrote: > > I'm going to commit this now, do I have to commit it somewhere else, too > > (because of branching or something)? > > Yes, you have to > cvs -d '<the-sourceforge-stuff>' checkout -r zsh-4_0-patches zsh > and apply it. Aha. I have that now, but whenever I try to commit the applied patches there, it says: cvs commit: Examining ... ... cvs [server aborted]: "commit" requires write access to the repository What am I doing wrong? > In general they shouldn't go straight onto the 4.0 branch until after a bit > of testing, but this one is presumably an improvement. Bart's suggestion > is someone (probably me, it looks like) applies all the 4.0 changes, but > I'm not enthusiastic about doing it all myself at the moment. Bart's 14744 would be fine with me (when I've learned how to commit there...). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: Re: 4.0.1 - arguments test fails 2001-06-06 10:51 ` PATCH: Re: 4.0.1 - arguments test fails Sven Wischnowsky @ 2001-06-06 10:58 ` Bart Schaefer 2001-06-06 11:06 ` Sven Wischnowsky 2001-06-06 11:00 ` Andrej Borsenkow 1 sibling, 1 reply; 11+ messages in thread From: Bart Schaefer @ 2001-06-06 10:58 UTC (permalink / raw) To: zsh-workers On Jun 6, 12:51pm, Sven Wischnowsky wrote: } Subject: Re: PATCH: Re: 4.0.1 - arguments test fails } } > Yes, you have to } > cvs -d '<the-sourceforge-stuff>' checkout -r zsh-4_0-patches zsh } > and apply it. } } cvs [server aborted]: "commit" requires write access to the repository } } What am I doing wrong? Probably you checked out a copy using the cvs pserver. You need to use the ssh flavor of <the-sourceforge-stuff>: CVS_RSH=ssh cvs -d 'wischnow@cvs.zsh.sourceforge.net:/cvsroot/zsh' ... -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PATCH: Re: 4.0.1 - arguments test fails 2001-06-06 10:58 ` Bart Schaefer @ 2001-06-06 11:06 ` Sven Wischnowsky 0 siblings, 0 replies; 11+ messages in thread From: Sven Wischnowsky @ 2001-06-06 11:06 UTC (permalink / raw) To: zsh-workers Bart Schaefer wrote: > On Jun 6, 12:51pm, Sven Wischnowsky wrote: > } Subject: Re: PATCH: Re: 4.0.1 - arguments test fails > } > } > Yes, you have to > } > cvs -d '<the-sourceforge-stuff>' checkout -r zsh-4_0-patches zsh > } > and apply it. > } > } cvs [server aborted]: "commit" requires write access to the repository > } > } What am I doing wrong? > > Probably you checked out a copy using the cvs pserver. You need to use > the ssh flavor of <the-sourceforge-stuff>: > > CVS_RSH=ssh cvs -d 'wischnow@cvs.zsh.sourceforge.net:/cvsroot/zsh' ... Ouch, yes, of course. Thanks (also to Andrej...). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: PATCH: Re: 4.0.1 - arguments test fails 2001-06-06 10:51 ` PATCH: Re: 4.0.1 - arguments test fails Sven Wischnowsky 2001-06-06 10:58 ` Bart Schaefer @ 2001-06-06 11:00 ` Andrej Borsenkow 1 sibling, 0 replies; 11+ messages in thread From: Andrej Borsenkow @ 2001-06-06 11:00 UTC (permalink / raw) To: Sven Wischnowsky, zsh-workers > Aha. I have that now, but whenever I try to commit the applied patches > there, it says: > > cvs commit: Examining ... > ... > cvs [server aborted]: "commit" requires write access to the repository > > What am I doing wrong? > Probably you've checked this out as anonymous? What is in CVS/Root? -andrej ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2001-06-06 11:07 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-06-01 22:28 4.0.1 - arguments test fails Andrej Borsenkow 2001-06-02 0:04 ` Peter Stephenson 2001-06-02 1:07 ` Bart Schaefer 2001-06-02 3:52 ` Bart Schaefer 2001-06-06 9:21 ` PATCH: " Sven Wischnowsky 2001-06-06 9:51 ` Peter Stephenson 2001-06-06 10:18 ` Branch patches (Re: PATCH: Re: 4.0.1 - arguments test fails) Bart Schaefer 2001-06-06 10:51 ` PATCH: Re: 4.0.1 - arguments test fails Sven Wischnowsky 2001-06-06 10:58 ` Bart Schaefer 2001-06-06 11:06 ` Sven Wischnowsky 2001-06-06 11:00 ` Andrej Borsenkow
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).