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

Unified Diff: tests/owners_unittest.py

Issue 2148683003: Fix relative file: paths in OWNERS with roots other than '/' (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « testing_support/filesystem_mock.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 5cb177411c6d6061107299ce8fb85a8e2d9c650a..5cc5371e64d80084b3be1ed3544a0d64d109ad4b 100755
--- a/tests/owners_unittest.py
+++ b/tests/owners_unittest.py
@@ -228,6 +228,15 @@ class OwnersDatabaseTest(_BaseTestCase):
self.assert_files_not_covered_by(['content/garply/baz.cc'],
[tom], ['content/garply/baz.cc'])
+ def test_file_include_relative_path_non_empty_root(self):
+ old_root = self.root
+ self.root = '/content'
+ self.assert_files_not_covered_by(['garply/foo.cc'], [peter], [])
+ self.assert_files_not_covered_by(['garply/bar.cc'], [darin], [])
+ self.assert_files_not_covered_by(['garply/baz.cc'],
+ [tom], ['garply/baz.cc'])
+ self.root = old_root
+
def test_file_include_per_file_absolute_path(self):
self.files['/content/qux/OWNERS'] = owners_file(peter,
lines=['per-file foo.*=file://content/baz/OWNERS'])
« no previous file with comments | « testing_support/filesystem_mock.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698