Page MenuHomePhabricator

tests: avoid echo with backslash escapes

Authored by martinvonz on Dec 15 2017, 1:57 AM.



Some shells' echo (e.g. Bash's) do not interpret backslash escapes by
default, while others shells' do (e.g. Dash's). This led to a failure
in test-run-tests.t. We could switch to the more compatible printf,
but using a heredoc seems simpler, so that's what this patch does.

For anyone who wants to test this for themselves, remove the "unset
HGTEST_SHELL" line in and pass
e.g. "--shell=/bin/dash" to the test runner.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Dec 15 2017, 1:57 AM
yuja accepted this revision.Dec 15 2017, 8:20 AM
This revision is now accepted and ready to land.Dec 15 2017, 8:20 AM
This revision was automatically updated to reflect the committed changes.