pager: add tests
We've never had tests for pager, and I want to start experimenting
with ways to clean up the implementation and make it a bit more
graceful.
run-tests: defer leftover (?) cleanup until after all output is exhausted
Previously, after matching a single line, any contiguous subsequent lines ending
with (?) would be added to the output and removed from the expected output.
This is a problem if the subsequent test output would have matched the consumed
(?) line, because it kept the optional line and then added a duplicate without
the (?) [1]. Instead, wait until there is nothing more to match before handling
the leftovers.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-February/080197.html
test-run-tests: pad the failure test to preserve the run order
Test size seems to dictate the order in which the tests are run, and the next
patch will add to test-success.t.
changelog: backed out changeset
86de91c56355
changelog: backed out changeset
1778770e1982
We want to avoid leaking UTF-8 to main body of code wherever possible.