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

Unified Diff: tests/git_cl_test.py

Issue 2117483002: Implement git cl upload -b BUG --bug=BUG. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 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
« git_cl.py ('K') | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index cc01ae3b829da5dbb5a2862a7a10aee44ade7886..a1d58a875172c92044de4fd0ab42f7e77150a956 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -208,6 +208,13 @@ class TestGitClBasic(unittest.TestCase):
123, 4, 'chrome-review.source.com')
test('https://chrome-review.source.com/bad/123/4', fail=True)
+ def test_get_bug_line_value(self):
+ self.assertEqual(git_cl._get_bug_line_value('', ''), '')
+ self.assertEqual(git_cl._get_bug_line_value('', '123,v8:456'), '123,v8:456')
+ self.assertEqual(git_cl._get_bug_line_value('v8', '456'), 'v8:456')
+ self.assertEqual(git_cl._get_bug_line_value('v8', 'chromium:123,456'),
+ 'chromium:123,v8:456')
+
class TestGitCl(TestCase):
def setUp(self):
@@ -688,6 +695,14 @@ class TestGitCl(TestCase):
self.assertEqual(
'Must specify reviewers to send email.\n', stderr.getvalue())
+ def test_bug_on_cmd(self):
+ self._run_reviewer_test(
+ ['--bug=500658,proj:123'],
+ 'desc\n\nBUG=500658,proj:123',
+ '# Blah blah comment.\ndesc\n\nBUG=500658,proj:1234',
+ 'desc\n\nBUG=500658,proj:1234',
+ [])
+
def test_dcommit(self):
self.mock(git_cl.sys, 'stdout', StringIO.StringIO())
self.calls = (
« git_cl.py ('K') | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698