diff options
Diffstat (limited to 'test/test_repo.py')
-rw-r--r-- | test/test_repo.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_repo.py b/test/test_repo.py index 6d617609..c5b2680d 100644 --- a/test/test_repo.py +++ b/test/test_repo.py @@ -1098,3 +1098,13 @@ class TestRepo(TestBase): except GitCommandError: pass self.assertEqual(r.currently_rebasing_on(), commitSpanish) + + @with_rw_directory + def test_do_not_strip_newline_in_stdout(self, rw_dir): + r = Repo.init(rw_dir) + fp = osp.join(rw_dir, 'hello.txt') + with open(fp, 'w') as fs: + fs.write("hello\n") + r.git.add(Git.polish_url(fp)) + r.git.commit(message="init") + self.assertEqual(r.git.show("HEAD:hello.txt", strip_newline_in_stdout=False), 'hello\n') |