X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=t%2Ftest.sh;h=bd2000d731e6cdaa3f95dff00ee3520b25fe417c;hb=95ec5924a6c2597f1b1a15aa9d6afcfe18bee222;hp=aedbff09d350623626a03b886ae09d34321aaec8;hpb=c9007797b11ff8347ea47e3e2e71b7a1f6d7e278;p=config%2Fdotfiles.git diff --git a/t/test.sh b/t/test.sh index aedbff0..bd2000d 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" } @@ -55,6 +55,10 @@ function testme() { } return 42; } + +allow = \$! \$? \$. +allow = \$! \$? \$. +allow = \$! \$? \$. EOF git add test.txt git commit -m 'Initial commit.' > /dev/null @@ -83,6 +87,10 @@ function testme() { } return 42; } + +allow = \$0 \$! \$? \$. +allow = \$! \$? +allow = \$0 \$! \$? EOF