This is an archive of the discontinued Mercurial Phabricator instance.

tests: avoid echo with backslash escapes
ClosedPublic

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

Details

Summary

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 helper-runtests.sh and pass
e.g. "--shell=/bin/dash" to the test runner.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.