X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=t%2Ftest.sh;h=6f1084b263486c2e1082e10e10bab56e97764ed5;hb=183f3b3c24c299fab47db281ef3fd8f69ea0e496;hp=aedbff09d350623626a03b886ae09d34321aaec8;hpb=c9007797b11ff8347ea47e3e2e71b7a1f6d7e278;p=config%2Fdotfiles.git diff --git a/t/test.sh b/t/test.sh index aedbff0..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 <