Index: svn_to_git_public_unittest.py |
=================================================================== |
--- svn_to_git_public_unittest.py (revision 0) |
+++ svn_to_git_public_unittest.py (revision 0) |
@@ -0,0 +1,34 @@ |
+#!/usr/bin/env python |
+# Copyright (c) 2014 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import unittest |
+ |
+import svn_to_git_public |
+ |
+ |
+class SvnUrlToGitUrlTest(unittest.TestCase): |
+ def testWebRtcUrls(self): |
+ expected = { |
+ 'deps/third_party/junit': '/deps/third_party/junit', |
agable
2014/10/10 08:57:51
Not a huge fan of adding *real* urls to this test.
kjellander_chromium
2014/10/10 09:03:53
I mostly wanted them for my own sake to doublechec
|
+ 'deps/third_party/openmax': '/deps/third_party/openmax', |
+ 'deps/third_party/winsdk_samples_v71': |
+ '/deps/third_party/winsdk_samples_v71', |
+ 'deps/third_party/android': '/deps/third_party/android', |
+ 'trunk': '', |
+ 'trunk/talk': '/trunk/talk', |
+ 'trunk/webrtc': '/trunk/webrtc', |
+ } |
+ svn_base_url = 'https://webrtc.googlecode.com/svn' |
+ git_base_url = svn_to_git_public.GIT_HOST + 'external/webrtc' |
agable
2014/10/10 08:57:51
Also, this kind of logic in a test is unfortunate.
kjellander_chromium
2014/10/10 09:03:53
Done.
|
+ |
+ path = 'just/some/path' |
+ for k, v in expected.iteritems(): |
+ res = svn_to_git_public.SvnUrlToGitUrl(path, '%s/%s' % (svn_base_url, k)) |
+ self.assertEqual(res[0], path) |
+ self.assertEqual(res[1], '%s%s.git' % (git_base_url, v)) |
+ |
+ |
+if __name__ == '__main__': |
+ unittest.main() |
Property changes on: svn_to_git_public_unittest.py |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |
Added: svn:executable |
+ * |