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.
12 lines
326 B
Perl
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
|
|
|