@ 201216.1

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/invert_match.t. All files

tests/invert_match.t

@@ -1,13 +1,13 @@ Setup:    $ . $TESTDIR/setup.sh-  $ echo 'valid: 1' > ./blah.txt-  $ echo 'some_string' >> ./blah.txt-  $ echo 'valid: 654' >> ./blah.txt-  $ echo 'some_other_string' >> ./blah.txt-  $ echo 'valid: 0' >> ./blah.txt-  $ echo 'valid: 23' >> ./blah.txt-  $ echo 'valid: 0' >> ./blah.txt+  $ printf 'valid: 1\n' > ./blah.txt+  $ printf 'some_string\n' >> ./blah.txt+  $ printf 'valid: 654\n' >> ./blah.txt+  $ printf 'some_other_string\n' >> ./blah.txt+  $ printf 'valid: 0\n' >> ./blah.txt+  $ printf 'valid: 23\n' >> ./blah.txt+  $ printf 'valid: 0\n' >> ./blah.txt  Search for lines not matching "valid: 0" in blah.txt: