@ 201216.1 · fetching

160413.1.1 · 1f2d79ebeec6849f6e151fc125b41539ef39e844

Use printf in place of echo in tests

The behaviour of echo is inconsistent between implementations, in particular regarding whether it expands escapes like `\n`. Use printf consistently in test scripts to avoid test failures from inconsistent echo behaviour.

Fixes #866.

reading declarations

Changes to tests/only_matching.t. All files

tests/only_matching.t

@@ -1,11 +1,11 @@ Setup:    $ . $TESTDIR/setup.sh-  $ echo "the quick brown foxy" > blah.txt-  $ echo "blah blah blah" >> blah.txt-  $ echo "another foxlike word" >> blah.txt-  $ echo "no matches here" >> blah.txt-  $ echo "blah blah blah" >> blah.txt+  $ printf "the quick brown foxy\n" > blah.txt+  $ printf "blah blah blah\n" >> blah.txt+  $ printf "another foxlike word\n" >> blah.txt+  $ printf "no matches here\n" >> blah.txt+  $ printf "blah blah blah\n" >> blah.txt  Only print matches: