| Index: PRESUBMIT_test.py
|
| diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
|
| index 979ad892f1a58278ef1f248fd462ffc67b7824ee..6a29aca96ed4af7dbb7c506f920e8d6b0b000b7a 100755
|
| --- a/PRESUBMIT_test.py
|
| +++ b/PRESUBMIT_test.py
|
| @@ -60,6 +60,14 @@ class MockFile(object):
|
| return self._local_path
|
|
|
|
|
| +class MockChange(object):
|
| + def __init__(self, changed_files):
|
| + self._changed_files = changed_files
|
| +
|
| + def LocalPaths(self):
|
| + return self._changed_files
|
| +
|
| +
|
| class IncludeOrderTest(unittest.TestCase):
|
| def testSystemHeaderOrder(self):
|
| scope = [(1, '#include <csystem.h>'),
|
| @@ -339,6 +347,14 @@ class BadExtensionsTest(unittest.TestCase):
|
| results = PRESUBMIT._CheckPatchFiles(mock_input_api, MockOutputApi())
|
| self.assertEqual(0, len(results))
|
|
|
| + def testOnlyOwnersFiles(self):
|
| + mock_change = MockChange([
|
| + 'some/path/OWNERS',
|
| + 'A\Windows\Path\OWNERS',
|
| + ])
|
| + results = PRESUBMIT.GetPreferredTrySlaves(None, mock_change)
|
| + self.assertEqual(0, len(results))
|
| +
|
|
|
| if __name__ == '__main__':
|
| unittest.main()
|
|
|