Mercurial > hg
comparison tests/test-run-tests.t @ 35416:417fa23017f9
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 14 Dec 2017 22:30:03 -0800 |
parents | 4441705b7111 |
children | f04d16bef2c7 |
comparison
equal
deleted
inserted
replaced
35415:56854848e485 | 35416:417fa23017f9 |
---|---|
701 python hash seed: * (glob) | 701 python hash seed: * (glob) |
702 [1] | 702 [1] |
703 | 703 |
704 Accept the fix | 704 Accept the fix |
705 | 705 |
706 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | 706 $ cat >> test-failure.t <<EOF |
707 $ echo " saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t | 707 > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
708 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | 708 > saved backup bundle to \$TESTTMP/foo.hg |
709 $ echo " saved backup bundle to \$TESTTMP\\foo.hg" >> test-failure.t | 709 > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
710 $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | 710 > saved backup bundle to $TESTTMP\\foo.hg |
711 $ echo " saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t | 711 > $ echo 'saved backup bundle to \$TESTTMP/foo.hg' |
712 > saved backup bundle to \$TESTTMP/*.hg (glob) | |
713 > EOF | |
712 $ echo 'y' | rt -i 2>&1 | 714 $ echo 'y' | rt -i 2>&1 |
713 | 715 |
714 --- $TESTTMP/test-failure.t | 716 --- $TESTTMP/test-failure.t |
715 +++ $TESTTMP/test-failure.t.err | 717 +++ $TESTTMP/test-failure.t.err |
716 @@ -1,5 +1,5 @@ | 718 @@ -1,5 +1,5 @@ |