# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-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"
}
}
return 42;
}
+
+allow = \$! \$? \$.
+allow = \$! \$? \$.
+allow = \$! \$? \$.
EOF
git add test.txt
git commit -m 'Initial commit.' > /dev/null
}
return 42;
}
+
+allow = \$0 \$! \$? \$.
+allow = \$! \$?
+allow = \$0 \$! \$?
EOF