diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-13 10:45:00 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-13 10:45:00 -0700 |
commit | bc67ad8c375ce8f31021411f088a968f12cb2675 (patch) | |
tree | 5cc9d598cf4040177c3765322f9b5f2551ba0d08 /t | |
parent | 978471dccec18daab3165c60a90ad59cbdb43723 (diff) | |
parent | c01bd5a29f38e4e9fd5c03f3e1e84b88c392dd6f (diff) | |
download | git-bc67ad8c375ce8f31021411f088a968f12cb2675.tar.gz git-bc67ad8c375ce8f31021411f088a968f12cb2675.tar.xz |
Merge branch 'js/blame-parsename' into maint
* js/blame-parsename:
t/annotate-tests: Use echo & cat instead of sed
blame: tolerate bogus e-mail addresses a bit better
Diffstat (limited to 't')
-rw-r--r-- | t/annotate-tests.sh | 13 | ||||
-rwxr-xr-x | t/t8002-blame.sh | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index d34208cc2..c56a77d23 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -1,5 +1,5 @@ # This file isn't used as a test script directly, instead it is -# sourced from t8001-annotate.sh and t8001-blame.sh. +# sourced from t8001-annotate.sh and t8002-blame.sh. check_count () { head= @@ -124,3 +124,14 @@ test_expect_success \ test_expect_success \ 'some edit' \ 'check_count A 1 B 1 B1 1 B2 1 "A U Thor" 1 C 1 D 1' + +test_expect_success \ + 'an obfuscated email added' \ + 'echo "No robots allowed" > file.new && + cat file >> file.new && + mv file.new file && + GIT_AUTHOR_NAME="E" GIT_AUTHOR_EMAIL="E at test dot git" git commit -a -m "norobots"' + +test_expect_success \ + 'obfuscated email parsed' \ + 'check_count A 1 B 1 B1 1 B2 1 "A U Thor" 1 C 1 D 1 E 1' diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh index d3a51e126..e2896cffc 100755 --- a/t/t8002-blame.sh +++ b/t/t8002-blame.sh @@ -8,7 +8,7 @@ PROG='git blame -c' PROG='git blame -c -e' test_expect_success 'Blame --show-email works' ' - check_count "<A@test.git>" 1 "<B@test.git>" 1 "<B1@test.git>" 1 "<B2@test.git>" 1 "<author@example.com>" 1 "<C@test.git>" 1 "<D@test.git>" 1 + check_count "<A@test.git>" 1 "<B@test.git>" 1 "<B1@test.git>" 1 "<B2@test.git>" 1 "<author@example.com>" 1 "<C@test.git>" 1 "<D@test.git>" 1 "<E at test dot git>" 1 ' test_done |