-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
- Loading branch information
1 parent
226ad34
commit cb5c952
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,11 @@ fuzz_blame () { | |
} | ||
|
||
test_expect_success setup ' | ||
cat >contacts <<-\EOF && | ||
A U Thor <[email protected]> | ||
nick1 <[email protected]> | ||
EOF | ||
echo one >one && | ||
git add one && | ||
test_tick && | ||
|
@@ -23,6 +28,44 @@ test_expect_success setup ' | |
git commit --author "nick1 <[email protected]>" -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 <[email protected]> | ||
nick1 <[email protected]> | ||
EOF | ||
git check-mailmap \ | ||
"A U Thor <[email protected]>" \ | ||
"nick1 <[email protected]>" >actual && | ||
test_cmp expect actual | ||
' | ||
|
||
test_expect_success 'check-mailmap --stdin' ' | ||
cat >expect <<-\EOF && | ||
A U Thor <[email protected]> | ||
nick1 <[email protected]> | ||
EOF | ||
git check-mailmap --stdin <contacts >actual && | ||
test_cmp expect actual | ||
' | ||
|
||
test_expect_success 'check-mailmap --stdin arguments' ' | ||
cat >expect <<-\EOF && | ||
Internal Guy <[email protected]> | ||
EOF | ||
cat <contacts >>expect && | ||
git check-mailmap --stdin "Internal Guy <[email protected]>" \ | ||
<contacts >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 | ||
|