Merge branch 'km/avoid-non-function-return-in-rebase'
[gitweb.git] / contrib / remote-helpers / test-bzr.sh
index 4f379c2ab499f2ca5556f844cbdcacb98fffa13c..a4656ce412cc8c192a636030a019c156bb58df7f 100755 (executable)
@@ -382,7 +382,7 @@ test_expect_success 'strip' '
 '
 
 test_expect_success 'export utf-8 authors' '
-       test_when_finished "rm -rf bzrrepo gitrepo && LC_ALL=C && unset GIT_COMMITTER_NAME" &&
+       test_when_finished "rm -rf bzrrepo gitrepo && LC_ALL=C && GIT_COMMITTER_NAME=\"C O Mitter\""
 
        LC_ALL=en_US.UTF-8
        export LC_ALL
@@ -411,4 +411,28 @@ test_expect_success 'export utf-8 authors' '
        test_cmp expected actual
 '
 
+test_expect_success 'push different author' '
+       test_when_finished "rm -rf bzrrepo gitrepo" &&
+
+       bzr init bzrrepo &&
+
+       (
+       git init gitrepo &&
+       cd gitrepo &&
+       echo john >> content &&
+       git add content &&
+       git commit -m john --author "John Doe <jdoe@example.com>" &&
+       git remote add bzr "bzr::../bzrrepo" &&
+       git push bzr master
+       ) &&
+
+       (
+       cd bzrrepo &&
+       bzr log | grep "^author: " > ../actual
+       ) &&
+
+       echo "author: John Doe <jdoe@example.com>" > expected &&
+       test_cmp expected actual
+'
+
 test_done