From: Eric Sunshine Date: Sat, 13 Jul 2013 00:53:11 +0000 (-0400) Subject: t4203: test check-mailmap command invocation X-Git-Tag: v1.8.4-rc0~20^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb5c9521f1e41aa536c2cf64d689e647d035bb90;p=thirdparty%2Fgit.git t4203: test check-mailmap command invocation Test the command-line interface of check-mailmap. (Actual .mailmap functionality is already covered by existing tests.) Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 842b7549ec..b7476f2220 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -13,6 +13,11 @@ fuzz_blame () { } test_expect_success setup ' + cat >contacts <<-\EOF && + A U Thor + nick1 + EOF + echo one >one && git add one && test_tick && @@ -23,6 +28,44 @@ test_expect_success setup ' git commit --author "nick1 " -m second ' +test_expect_success 'check-mailmap no arguments' ' + test_must_fail git check-mailmap +' + +test_expect_success 'check-mailmap arguments' ' + cat >expect <<-\EOF && + A U Thor + nick1 + EOF + git check-mailmap \ + "A U Thor " \ + "nick1 " >actual && + test_cmp expect actual +' + +test_expect_success 'check-mailmap --stdin' ' + cat >expect <<-\EOF && + A U Thor + nick1 + EOF + git check-mailmap --stdin actual && + test_cmp expect actual +' + +test_expect_success 'check-mailmap --stdin arguments' ' + cat >expect <<-\EOF && + Internal Guy + EOF + cat >expect && + git check-mailmap --stdin "Internal Guy " \ + actual && + test_cmp expect actual +' + +test_expect_success 'check-mailmap bogus contact' ' + test_must_fail git check-mailmap bogus +' + cat >expect <<\EOF A U Thor (1): initial