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

Unified Diff: tests/gclient_utils_test.py

Issue 4144002: gclient can now handle git URLs containing "-" in usernames and "~" in paths.... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: Created 10 years, 2 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_utils_test.py
===================================================================
--- tests/gclient_utils_test.py (revision 63873)
+++ tests/gclient_utils_test.py (working copy)
@@ -152,6 +152,20 @@
out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev))
self.assertEquals(out_rev, rev)
self.assertEquals(out_url, url)
+ url = "ssh://user-name@example.com/~/test.git"
+ out_url, out_rev = gclient_utils.SplitUrlRevision(url)
+ self.assertEquals(out_rev, None)
+ self.assertEquals(out_url, url)
+ out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev))
+ self.assertEquals(out_rev, rev)
+ self.assertEquals(out_url, url)
+ url = "ssh://user-name@example.com/~username/test.git"
+ out_url, out_rev = gclient_utils.SplitUrlRevision(url)
+ self.assertEquals(out_rev, None)
+ self.assertEquals(out_url, url)
+ out_url, out_rev = gclient_utils.SplitUrlRevision("%s@%s" % (url, rev))
+ self.assertEquals(out_rev, rev)
+ self.assertEquals(out_url, url)
def testSVNUrl(self):
url = "svn://example.com/test"
« no previous file with comments | « gclient_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698