diff options
author | Julian Andres Klode <jak@debian.org> | 2016-08-24 01:40:43 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-08-26 22:17:55 +0200 |
commit | 76325a660e09d3af503c292ae12c9de2830994e5 (patch) | |
tree | 199b37cd126490b2ca2d15e9d91feb509eee9067 /test/integration/test-external-dependency-solver-protocol | |
parent | c5306b16a34a6f82cb53668287267e4de3065ea1 (diff) |
test: Use printf "%b\n" instead of echo for strings with '\'
Use of echo with special characters is not portable. On a normal
POSIX system, the behavior with backslash escaped strings is
implementation-defined. On an XSI-conformant system, they must
be interpreted.
A way out is the printf command - printf "%b" specifies that
the following argument is to be printed with backslash escapes
interpreted.
Gbp-Dch: ignore
Diffstat (limited to 'test/integration/test-external-dependency-solver-protocol')
-rwxr-xr-x | test/integration/test-external-dependency-solver-protocol | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index 10b07e896..c86038b1b 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -152,7 +152,7 @@ testsuccess grep 'ERR_UNSOLVABLE' rootdir/tmp/testfailure.output configarchitecture 'armel' testfailure aptget install --solver apt awesomecoolstuff:i386 -s msgtest 'An invalid EDSP file generates a' 'hard error' -if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver > solver.result 2>&1; then +if printf "%b\n" "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver > solver.result 2>&1; then cat solver.result msgfail else |