# elif error
"\\if false\n\\elif error\n\\endif\n"
# ignore commands on error (stdout must be empty)
"\\if error\n\\echo NO\n\\else\n\\echo NO\n\\endif\n"
Those are already in the regression (around line 2763 of
expected/psql.out), are you saying we should have them in TAP as well?
Should we only do TAP tests?
Ok. so, maybe just the first one. The idea would be to cover more cases of
on error stop and check that it indeed stopped.
Find attached a small patch to improve tap tests, which also checks that
psql really exited by checking that nothing is printed afterwards.
Also, for some reason there were \\n instead of \n in some place, it was
working because the first command induced the error.
Anyway, here's the Ctrl-C behavior:
Ok. Basically it moves up each time Ctrl-C is called. Fine.
The future improvement would be to do that if the current input line was
empty, otherwise only the current input line would be cleaned up.
Ctrl-C exits do the same before/after state checks that \endif does, the
lone difference being that it "escaped" the \if rather than "exited" the
\if. Thanks to Daniel for pointing out where it should be handled, because
I wasn't going to figure that out on my own.
v7's only major difference from v6 is the Ctrl-C branch escaping.
Ok. Bar from minor tests improvements, this looks pretty much ok to me.
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: