diffstat: made test case work with POSIX sh and printf
authorYuya Nishihara <yuya@tcha.org>
Tue, 27 Oct 2009 21:59:44 +0900
changeset 9651 bd3af545c7c6
parent 9650 1ad02c04356c
child 9656 2ae3758526d8
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
tests/test-diffstat
--- 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'