OLD | NEW |
| (Empty) |
1 #!/usr/bin/env python | |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 import unittest | |
7 | |
8 import svn_to_git_public | |
9 | |
10 | |
11 class SvnUrlToGitUrlTest(unittest.TestCase): | |
12 def testWebRtcUrls(self): | |
13 expected = { | |
14 'deps/third_party/foo': 'external/webrtc/deps/third_party/foo', | |
15 'trunk': 'external/webrtc', | |
16 'trunk/bar': 'external/webrtc/trunk/bar', | |
17 } | |
18 svn_base_url = 'https://webrtc.googlecode.com/svn' | |
19 | |
20 path = 'just/some/path' | |
21 for k, v in expected.iteritems(): | |
22 res = svn_to_git_public.SvnUrlToGitUrl(path, '%s/%s' % (svn_base_url, k)) | |
23 self.assertEqual(res[0], path) | |
24 self.assertEqual(res[1], '%s%s.git' % (svn_to_git_public.GIT_HOST, v)) | |
25 | |
26 if __name__ == '__main__': | |
27 unittest.main() | |
OLD | NEW |