summaryrefslogtreecommitdiff
path: root/t/t4045-diff-relative.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2012-03-13 05:05:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-13 21:26:33 (GMT)
commit6dd88832e77ad7c0c7f82522d3741b5b7bf62fbd (patch)
tree52a1cb27cd23d28d71dbf9647b759ac2ad2d967e /t/t4045-diff-relative.sh
parent2983c0e22a5b6a56b8f5d7bb2dd2a3a0e26ac005 (diff)
downloadgit-6dd88832e77ad7c0c7f82522d3741b5b7bf62fbd.zip
git-6dd88832e77ad7c0c7f82522d3741b5b7bf62fbd.tar.gz
git-6dd88832e77ad7c0c7f82522d3741b5b7bf62fbd.tar.bz2
diffstat summary line varies by locale: miscellany
These changes are in the same spirit as the six patches that precede them, but they haven't been split into individually justifiable patches yet. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4045-diff-relative.sh')
-rwxr-xr-xt/t4045-diff-relative.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/t/t4045-diff-relative.sh b/t/t4045-diff-relative.sh
index bd119be..18fadcf 100755
--- a/t/t4045-diff-relative.sh
+++ b/t/t4045-diff-relative.sh
@@ -29,6 +29,18 @@ test_expect_success "-p $*" "
"
}
+check_numstat() {
+expect=$1; shift
+cat >expected <<EOF
+1 0 $expect
+EOF
+test_expect_success "--numstat $*" "
+ echo '1 0 $expect' >expected &&
+ git diff --numstat $* HEAD^ >actual &&
+ test_cmp expected actual
+"
+}
+
check_stat() {
expect=$1; shift
cat >expected <<EOF
@@ -37,7 +49,7 @@ cat >expected <<EOF
EOF
test_expect_success "--stat $*" "
git diff --stat $* HEAD^ >actual &&
- test_cmp expected actual
+ test_i18ncmp expected actual
"
}
@@ -52,7 +64,7 @@ test_expect_success "--raw $*" "
"
}
-for type in diff stat raw; do
+for type in diff numstat stat raw; do
check_$type file2 --relative=subdir/
check_$type file2 --relative=subdir
check_$type dir/file2 --relative=sub