diffstat: made test case work with POSIX sh and printf
* arithmetic expression ((...)), without $, is bashism.
* printf '\xXX' seems non-standard. '\0' is okay.
http://www.opengroup.org/onlinepubs/
009695399/utilities/printf.html
tested with bash 4.0 and dash 0.5.5.1
--- a/tests/test-diffstat Tue Oct 27 10:33:41 2009 +0100
+++ b/tests/test-diffstat Tue Oct 27 21:59:44 2009 +0900
@@ -2,7 +2,7 @@
hg init repo
cd repo
-i=0; while (( $i < 213 )); do echo a >> a; i=$(($i + 1)); done
+i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=$(($i + 1)); done
hg add a
echo '% wide diffstat'
@@ -24,7 +24,7 @@
hg ci -m appenda
-printf '%b' '\x00' > b
+printf '\0' > b
hg add b
echo '% binary diffstat'