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/vimgrep.t. All files
@@ -1,10 +1,10 @@ Setup: $ . $TESTDIR/setup.sh- $ echo 'Hello, "Hello, world" programs output "Hello, world".' > ./test_vimgrep.txt- $ echo '"Hello, world" programs are simple programs.' >> ./test_vimgrep.txt- $ echo 'They illustrate the most basic syntax of a programming language' >> ./test_vimgrep.txt- $ echo 'In javascript: alert("Hello, world!");' >> ./test_vimgrep.txt+ $ printf 'Hello, "Hello, world" programs output "Hello, world".\n' > ./test_vimgrep.txt+ $ printf '"Hello, world" programs are simple programs.\n' >> ./test_vimgrep.txt+ $ printf 'They illustrate the most basic syntax of a programming language\n' >> ./test_vimgrep.txt+ $ printf 'In javascript: alert("Hello, world!");\n' >> ./test_vimgrep.txt Search for lines matching "hello" in test_vimgrep.txt: