Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Unified Diff: tests/gclient_scm_test.py

Issue 546022: gclient: git relative url implementation (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_utils.py ('k') | tests/gclient_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_scm_test.py
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index 9794b51a77910ab48182cabd5f6adad2f6d25c1e..66c1f5e3b335488bf73c33d5126d4e84ea51ec09 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -66,8 +66,8 @@ class SVNWrapperTestCase(BaseTestCase):
members = [
'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo',
'CaptureStatus', 'DiffItem', 'GenerateDiff', 'GetCheckoutRoot',
- 'GetEmail', 'GetFileProperty', 'IsMoved', 'ReadSimpleAuth', 'Run',
- 'RunAndFilterOutput', 'RunAndGetFileList',
+ 'GetEmail', 'GetFileProperty', 'FullUrlForRelativeUrl', 'IsMoved',
+ 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList',
'RunCommand', 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url',
]
@@ -81,6 +81,22 @@ class SVNWrapperTestCase(BaseTestCase):
exception_msg = 'Unsupported scm %(scm_name)s' % kwargs
self.assertRaisesError(exception_msg, self._scm_wrapper, *args, **kwargs)
+ def testSVNFullUrlForRelativeUrl(self):
+ self.url = 'svn://a/b/c/d'
+
+ self.mox.ReplayAll()
+ scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
+ relpath=self.relpath)
+ self.assertEqual(scm.FullUrlForRelativeUrl('/crap'), 'svn://a/b/crap')
+
+ def testGITFullUrlForRelativeUrl(self):
+ self.url = 'git://a/b/c/d'
+
+ self.mox.ReplayAll()
+ scm = self._scm_wrapper(url=self.url, root_dir=self.root_dir,
+ relpath=self.relpath)
+ self.assertEqual(scm.FullUrlForRelativeUrl('/crap'), 'git://a/b/c/crap')
+
def testRunCommandException(self):
options = self.Options(verbose=False)
file_path = gclient_scm.os.path.join(self.root_dir, self.relpath, '.git')
@@ -361,10 +377,11 @@ from :3
def testDir(self):
members = [
'COMMAND', 'Capture', 'CaptureStatus', 'FetchUpstreamTuple',
- 'GenerateDiff', 'GetBranch', 'GetBranchRef', 'GetCheckoutRoot',
- 'GetDifferentFiles', 'GetEmail', 'GetPatchName', 'GetSVNBranch',
- 'GetUpstream', 'IsGitSvn', 'RunAndFilterOutput', 'ShortBranchName',
- 'RunCommand', 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
+ 'FullUrlForRelativeUrl', 'GenerateDiff', 'GetBranch', 'GetBranchRef',
+ 'GetCheckoutRoot', 'GetDifferentFiles', 'GetEmail', 'GetPatchName',
+ 'GetSVNBranch', 'GetUpstream', 'IsGitSvn', 'RunAndFilterOutput',
+ 'ShortBranchName', 'RunCommand',
+ 'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert',
'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url',
]
« no previous file with comments | « gclient_utils.py ('k') | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698