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

Unified Diff: tests/owners_unittest.py

Issue 11434048: allow spaces on the per-file directives in OWNERS files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 1 month 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
« owners.py ('K') | « owners.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/owners_unittest.py
diff --git a/tests/owners_unittest.py b/tests/owners_unittest.py
index 7a544e13bec19dc660ff2d73fa35a61982768acf..e031ab87b92290a47f18123fd2bb3b8378b4e3f0 100755
--- a/tests/owners_unittest.py
+++ b/tests/owners_unittest.py
@@ -154,6 +154,23 @@ class OwnersDatabaseTest(unittest.TestCase):
[tom],
['content/baz'])
+ def test_per_file_with_spaces(self):
+ # This is the same as test_per_file(), except that we include spaces
+ # on the per-file line. brett isn't allowed to approve ugly.cc;
+ # tom is allowed to approve ugly.cc, but not froboz.h
+ self.files['/content/baz/OWNERS'] = owners_file(brett,
+ lines=['per-file ugly.* = tom@example.com'])
+ self.assert_dirs_not_covered_by(['content/baz/ugly.cc'],
+ [brett],
+ [])
+
+ self.assert_dirs_not_covered_by(['content/baz/ugly.cc'],
+ [tom],
+ [])
+ self.assert_dirs_not_covered_by(['content/baz/froboz.h'],
+ [tom],
+ ['content/baz'])
+
def test_per_file__set_noparent(self):
self.files['/content/baz/OWNERS'] = owners_file(brett,
lines=['per-file ugly.*=tom@example.com',
« owners.py ('K') | « owners.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698