From 000792830b8ca96e6d973545192cba8d5df48279 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 30 Dec 2006 02:35:14 -0800 Subject: t3900: test log --encoding=none Signed-off-by: Junio C Hamano --- t/t3900-i18n-commit.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh index 46fd47cb0f..6714b0dd6e 100755 --- a/t/t3900-i18n-commit.sh +++ b/t/t3900-i18n-commit.sh @@ -8,7 +8,7 @@ test_description='commit and log output encodings' . ./test-lib.sh compare_with () { - git-show -s "$1" | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current && + git-show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current && diff -u current "$2" } @@ -112,4 +112,11 @@ do done done +for H in ISO-8859-1 EUCJP ISO-2022-JP +do + test_expect_success "No conversion with $H" ' + compare_with "--encoding=none '$H'" ../t3900/'$H'.txt + ' +done + test_done -- cgit v1.2.3 From d77a64d353cea0f72655b86dd04bcf9f86cbbea6 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 30 Dec 2006 22:13:05 -0500 Subject: Teach Git how to parse standard power of 2 suffixes. Sometimes its necessary to supply a value as a power of two in a configuration parameter. In this case the user may want to use the standard suffixes such as K, M, or G to indicate that the numerical value should be multiplied by a constant base before being used. Shell scripts/etc. can also benefit from this automatic option parsing with `git repo-config --int`. [jc: with a couple of test and a slight input tightening] Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- t/t1300-repo-config.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 't') diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index e48a4ecdcf..a29caa06dc 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -391,5 +391,15 @@ EOF test_expect_success "rename succeeded" "diff -u expect .git/config" +test_expect_success numbers ' + + git-repo-config kilo.gram 1k && + git-repo-config mega.ton 1m && + k=$(git-repo-config --int --get kilo.gram) && + test z1024 = "z$k" && + m=$(git-repo-config --int --get mega.ton) && + test z1048576 = "z$m" +' + test_done -- cgit v1.2.3