cat >expect.$1
test_expect_success "format $1" "
git rev-list --pretty=format:$2 master >output.$1 &&
-git diff expect.$1 output.$1
+test_cmp expect.$1 output.$1
"
}
commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
EOF
+test_expect_success 'empty email' '
+ test_tick &&
+ C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
+ A=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&
+ test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700" || {
+ echo "Eh? $A" >failure
+ false
+ }
+'
+
test_done