X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=t%2Ftest.sh;h=6f1084b263486c2e1082e10e10bab56e97764ed5;hb=03ab1c6670d209c416eecb35625173b527f019bb;hp=81e3b12aaf36c0240186ca04f6c8665dce54b8f1;hpb=eea3b32e72174023716ecbbd3c4d627091dfdb2f;p=config%2Fdotfiles.git diff --git a/t/test.sh b/t/test.sh index 81e3b12..6f1084b 100755 --- a/t/test.sh +++ b/t/test.sh @@ -2,7 +2,7 @@ # Small test file to check different --word-diff-regex settings in Git. -# Copyright (C) 2012 Simon Ruderich +# Copyright (C) 2012-2014 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,11 +18,11 @@ # along with this program. If not, see . -set -e +set -eu git_diff() { git diff --color=never --word-diff=plain --word-diff-regex="$1" \ - | grep -v '^index ' > "result-$2.txt" + | grep -v '^index ' >"result-$2.txt" diff -u "../expected-$2.txt" "result-$2.txt" } @@ -31,8 +31,8 @@ git_diff() { mkdir test cd test -git init > /dev/null -cat > test.txt </dev/null +cat >test.txt < /dev/null +git commit -m 'Initial commit.' >/dev/null -cat > test.txt <test.txt <