Index: tests/scm_unittest.py |
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py |
index ca17cd39ad23bd11c51047e5ba0b92495edc8429..ca50790be5415be0071aff1c1a4be35f2f6f1ec9 100755 |
--- a/tests/scm_unittest.py |
+++ b/tests/scm_unittest.py |
@@ -92,6 +92,7 @@ class GitWrapperTestCase(BaseSCMTestCase): |
'IsGitSvn', |
'IsValidRevision', |
'MatchSvnGlob', |
+ 'ParseGitSvnSha1', |
'ShortBranchName', |
] |
# If this test fails, you should add the relevant test. |
@@ -167,6 +168,16 @@ class RealGitSvnTest(fake_repos.FakeReposTestBase): |
self._capture(['reset', '--hard', 'HEAD^']) |
self.assertEquals(scm.GIT.GetGitSvnHeadRev(cwd=self.clone_dir), 1) |
+ def testParseGitSvnSha1(self): |
+ test_sha1 = 'a5c63ce8671922e5c59c0dea49ef4f9d4a3020c9' |
+ expected_output = test_sha1 + '\n' |
+ # Cygwin git-svn 1.7.9 prints extra escape sequences when run under |
+ # TERM=xterm |
+ cygwin_output = test_sha1 + '\n\033[?1034h' |
Dirk Pranke
2012/08/09 18:52:23
Great, this is what I was looking for ...
|
+ |
+ self.assertEquals(scm.GIT.ParseGitSvnSha1(expected_output), test_sha1) |
+ self.assertEquals(scm.GIT.ParseGitSvnSha1(cygwin_output), test_sha1) |
+ |
def testGetGetSha1ForSvnRev(self): |
if not self.enabled: |
return |