| OLD | NEW |
| 1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) | 1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions | 4 # modification, are permitted provided that the following conditions |
| 5 # are met: | 5 # are met: |
| 6 # 1. Redistributions of source code must retain the above copyright | 6 # 1. Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # 2. Redistributions in binary form must reproduce the above copyright | 8 # 2. Redistributions in binary form must reproduce the above copyright |
| 9 # notice, this list of conditions and the following disclaimer in the | 9 # notice, this list of conditions and the following disclaimer in the |
| 10 # documentation and/or other materials provided with the distribution. | 10 # documentation and/or other materials provided with the distribution. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 def test_paths_none(self): | 45 def test_paths_none(self): |
| 46 paths = self._change_directory(checkout_root=self._checkout_root, paths=
None) | 46 paths = self._change_directory(checkout_root=self._checkout_root, paths=
None) |
| 47 self._assert_result(paths, None, [], self._checkout_root) | 47 self._assert_result(paths, None, [], self._checkout_root) |
| 48 | 48 |
| 49 def test_paths_convertible(self): | 49 def test_paths_convertible(self): |
| 50 paths = ["/chromium/src/foo1.txt", "/chromium/src/foo2.txt"] | 50 paths = ["/chromium/src/foo1.txt", "/chromium/src/foo2.txt"] |
| 51 paths = self._change_directory(checkout_root=self._checkout_root, paths=
paths) | 51 paths = self._change_directory(checkout_root=self._checkout_root, paths=
paths) |
| 52 self._assert_result(paths, ["foo1.txt", "foo2.txt"], [], self._checkout_
root) | 52 self._assert_result(paths, ["foo1.txt", "foo2.txt"], [], self._checkout_
root) |
| 53 | 53 |
| 54 def test_with_scm_paths_unconvertible(self): | 54 def test_with_git_paths_unconvertible(self): |
| 55 paths = ["/chromium/src/foo1.txt", "/outside/foo2.txt"] | 55 paths = ["/chromium/src/foo1.txt", "/outside/foo2.txt"] |
| 56 paths = self._change_directory(checkout_root=self._checkout_root, paths=
paths) | 56 paths = self._change_directory(checkout_root=self._checkout_root, paths=
paths) |
| 57 log_messages = [ | 57 log_messages = [ |
| 58 """WARNING: Path-dependent style checks may not work correctly: | 58 """WARNING: Path-dependent style checks may not work correctly: |
| 59 | 59 |
| 60 One of the given paths is outside the repository of the current | 60 One of the given paths is outside the repository of the current |
| 61 working directory: | 61 working directory: |
| 62 | 62 |
| 63 Path: /outside/foo2.txt | 63 Path: /outside/foo2.txt |
| 64 Checkout root: /chromium/src | 64 Checkout root: /chromium/src |
| 65 | 65 |
| 66 Pass only files below the checkout root to ensure correct results. | 66 Pass only files below the checkout root to ensure correct results. |
| 67 See the help documentation for more info. | 67 See the help documentation for more info. |
| 68 | 68 |
| 69 """] | 69 """] |
| 70 self._assert_result(paths, paths, log_messages, self._original_directory
) | 70 self._assert_result(paths, paths, log_messages, self._original_directory
) |
| OLD | NEW |