Chromium Code Reviews| Index: tests/gclient_test.py |
| diff --git a/tests/gclient_test.py b/tests/gclient_test.py |
| index fb6577913e248408e84a689219b4cc2fd4ba35c8..a884ab159efbd31f4ba647b1c14f7bcb41c11d81 100755 |
| --- a/tests/gclient_test.py |
| +++ b/tests/gclient_test.py |
| @@ -809,6 +809,56 @@ class GclientTest(trial_dir.TestCase): |
| ], |
| self._get_processed()) |
| + def testGitDeps(self): |
| + """Verifies gclient respects fallback to DEPS.""" |
|
iannucci
2014/07/01 22:04:08
docstring is off.
cmp
2014/07/01 22:11:50
Fixed in a version I uploaded earlier.
|
| + write( |
| + '.gclient', |
| + 'solutions = [\n' |
| + ' { "name": "foo", "url": "svn://example.com/foo",\n' |
| + ' "deps_file" : ".DEPS.git",\n' |
| + ' },\n' |
| + ']') |
| + write( |
| + os.path.join('foo', '.DEPS.git'), |
| + 'deps = {\n' |
| + ' "bar": "/bar",\n' |
| + '}') |
| + |
| + options, _ = gclient.OptionParser().parse_args([]) |
| + obj = gclient.GClient.LoadCurrentConfig(options) |
| + obj.RunOnDeps('None', []) |
| + self.assertEquals( |
| + [ |
| + 'svn://example.com/foo', |
| + 'svn://example.com/foo/bar', |
| + ], |
| + self._get_processed()) |
| + |
| + def testGitDepsFallback(self): |
| + """Verifies gclient respects fallback to DEPS.""" |
| + write( |
| + '.gclient', |
| + 'solutions = [\n' |
| + ' { "name": "foo", "url": "svn://example.com/foo",\n' |
| + ' "deps_file" : ".DEPS.git",\n' |
| + ' },\n' |
| + ']') |
| + write( |
| + os.path.join('foo', 'DEPS'), |
| + 'deps = {\n' |
| + ' "bar": "/bar",\n' |
| + '}') |
| + |
| + options, _ = gclient.OptionParser().parse_args([]) |
| + obj = gclient.GClient.LoadCurrentConfig(options) |
| + obj.RunOnDeps('None', []) |
| + self.assertEquals( |
| + [ |
| + 'svn://example.com/foo', |
| + 'svn://example.com/foo/bar', |
| + ], |
| + self._get_processed()) |
| + |
| if __name__ == '__main__': |
| sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout) |