the_silver_searcher/tests/ignore_gitignore.t
Adam Dinwoodie 1f2d79ebee 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.
2016-03-15 03:42:19 +00:00

12 lines
326 B
Perl

Setup:
$ . $TESTDIR/setup.sh
$ export HOME=$PWD
$ printf '[core]\nexcludesfile = ~/.gitignore.global' >> $HOME/.gitconfig
$ printf 'PATTERN_MARKER\n' > .gitignore.global
Test that the ignore pattern got picked up:
$ ag --debug . | grep PATTERN_MARKER
DEBUG: added ignore pattern PATTERN_MARKER to root ignores