On 9/11/07, Dmitry Timoshkov dmitry@codeweavers.com wrote:
"Lei Zhang" thestig@google.com wrote:
I'll add EM_GETSEL checks as well.
I'm sorry, but in your latest patch you have added only one EM_GETSEL, but that's not "after every message" as repeated in each my mail.
-- Dmitry.
I feel "after every message" is bloating the test too much. If we take the approach where we believe anything can go wrong and check everything after every message, then we'll spend the rest of our lives writing tests.
The goal of this test is to make sure undo works. I had forgotten that hitting undo after a cut restores the previous selection. So yes, the test is not thorough enough. I will check the selection and check the buffer contents at the beginning and after every undo to make sure the pre and post conditions hold. Does this seem reasonable?
The goal here is not to verify setting test/cutting/pasting/selecting works. Those should be tested separately.