Index: tests/git_common_test.py |
diff --git a/tests/git_common_test.py b/tests/git_common_test.py |
index 8e223c53d34fb647314cdf18928c705ef17f15b0..3f2a49a61fa9ae54d56c67aa8265b2efd7f1243f 100755 |
--- a/tests/git_common_test.py |
+++ b/tests/git_common_test.py |
@@ -859,6 +859,17 @@ class GitFreezeThaw(git_test_utils.GitRepoReadWriteTestBase): |
self.repo.run(inner) |
+ def testAddError(self): |
+ def inner(): |
+ self.repo.git('checkout', '-b', 'unreadable_file_branch') |
+ with open('bad_file', 'w') as f: |
+ f.write('some text') |
+ os.chmod('bad_file', 0111) |
+ ret = self.repo.run(self.gc.freeze) |
+ self.assertIn('Failed to index some unindexed files.', ret) |
+ |
+ self.repo.run(inner) |
+ |
class GitMakeWorkdir(git_test_utils.GitRepoReadOnlyTestBase, GitCommonTestBase): |
def setUp(self): |