HomePhabricator

tests: avoid echo with backslash escapes

Authored by martinvonz.

Description

tests: avoid echo with backslash escapes

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.

Differential Revision: https://phab.mercurial-scm.org/D1699

Details

Committed
martinvonzDec 15 2017, 1:30 AM
Differential Revision
D1699: tests: avoid echo with backslash escapes
Parents
rHG56854848e485: hgweb: stop using HTML comments in <script>
Branches
Unknown
Tags
Unknown