git-svn: add --authors-prog option
[gitweb.git] / t / t9122-git-svn-author.sh
index 8c58f0b8d7488732d25fd1d154b6c5459f5d080e..30013b7bb948640869d5c5208b2feeb08c011b73 100755 (executable)
@@ -4,16 +4,16 @@ test_description='git svn authorship'
 . ./lib-git-svn.sh
 
 test_expect_success 'setup svn repository' '
-       svn checkout "$svnrepo" work.svn &&
+       svn_cmd checkout "$svnrepo" work.svn &&
        (
                cd work.svn &&
                echo >file
-               svn add file
-               svn commit -m "first commit" file
+               svn_cmd add file
+               svn_cmd commit -m "first commit" file
        )
 '
 
-test_expect_success 'interact with it via git-svn' '
+test_expect_success 'interact with it via git svn' '
        mkdir work.git &&
        (
                cd work.git &&
@@ -64,7 +64,21 @@ test_expect_success 'interact with it via git-svn' '
 
        # Make sure --add-author-from with --use-log-author affected
        # the authorship information
-       grep "^Author: A U Thor " actual.4
+       grep "^Author: A U Thor " actual.4 &&
+
+       # Make sure there are no commit messages with excess blank lines
+       test $(grep "^ " actual.2 | wc -l) = 3 &&
+       test $(grep "^ " actual.3 | wc -l) = 5 &&
+       test $(grep "^ " actual.4 | wc -l) = 5 &&
+
+       # Make sure there are no svn commit messages with excess blank lines
+       (
+               cd work.svn &&
+               svn_cmd up &&
+               
+               test $(svn_cmd log -r2:2 | wc -l) = 5 &&
+               test $(svn_cmd log -r4:4 | wc -l) = 7
+       )
 '
 
 test_done