Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Commit 137b15a fails X02zlevi test
On Feb 8, 12:13pm, Bart Schaefer wrote:
} Subject: Commit 137b15a fails X02zlevi test
}
} Not sure if this is bad test data or if workers/32342 broke "print -z".
OK, it's neither of those. If I rearrange the tests to put that one
first, it works and the next test that begins with "comptesteval ..."
fails instead.
The problem stems from the same zpty used for all the tests, and there
is something about the "zletest" function that leaves the zpty in a
bad state for a subsequent "comptesteval". Oddly, two "zletest" calls
in a row do not encounter whatever situation this is.
For some reason, the command that ends "comptesteval", which is
. /tmp/comptest.$$
is being executed *again* at the beginning of zletest, which produces
an error such as
.: no such file or directory: /tmp/comptest.16194
I haven't figured out how to tell whether this means the comptest.$$
file is never read, or if it is read but the buffer is being cleared
when that error occurs and therefore is in the wrong state when the
actual test input is executed.
The only obvious difference between "comptesteval" and "zletest" is
that the former uses
zpty -w zsh ". $tmp"
where the latter uses
zpty -n -w zsh "$input"$'\C-M'
in which the ^M is supposed to invoke the zle-finish widget.
I note that the zle-finish widget uses "zle send-break" and then tries
to do "zle -R" after it. That won't work, "zle send-break" causes an
implicit return from the widget in which it is executed. But it ought
to reset ZLE to viins mode, even without the "zle -K main", so I remain
puzzled why the subsequent comptesteval would fail given that the first
one (before any zletest call) succeeds.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author