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

Side by Side Diff: tests/git_footers_test.py

Issue 1812803002: Gerrit git cl: fix change-id appending. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: nit Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « git_footers.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 """Tests for git_footers.""" 3 """Tests for git_footers."""
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import unittest 7 import unittest
8 8
9 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 9 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 'header\n\nBUG: yy\nChange-Id: Ixxx') 92 'header\n\nBUG: yy\nChange-Id: Ixxx')
93 93
94 self.assertEqual( 94 self.assertEqual(
95 git_footers.add_footer_change_id('header\n\nBUG: yy\nPos: 1', 'Ixxx'), 95 git_footers.add_footer_change_id('header\n\nBUG: yy\nPos: 1', 'Ixxx'),
96 'header\n\nBUG: yy\nChange-Id: Ixxx\nPos: 1') 96 'header\n\nBUG: yy\nChange-Id: Ixxx\nPos: 1')
97 97
98 self.assertEqual( 98 self.assertEqual(
99 git_footers.add_footer_change_id('header\n\nBUG: yy\n\nPos: 1', 'Ixxx'), 99 git_footers.add_footer_change_id('header\n\nBUG: yy\n\nPos: 1', 'Ixxx'),
100 'header\n\nBUG: yy\n\nChange-Id: Ixxx\nPos: 1') 100 'header\n\nBUG: yy\n\nChange-Id: Ixxx\nPos: 1')
101 101
102 # Special case: first line is never a footer, even if it looks line one.
103 self.assertEqual(
104 git_footers.add_footer_change_id('header: like footer', 'Ixxx'),
105 'header: like footer\n\nChange-Id: Ixxx')
106
102 107
103 if __name__ == '__main__': 108 if __name__ == '__main__':
104 unittest.main() 109 unittest.main()
OLDNEW
« no previous file with comments | « git_footers.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698