From 80b60fafa94b794fa77fab85e1df66f52598f3ac Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 29 May 2008 02:19:18 -0700 Subject: tests: add a test for the new with_raw_output mechanism This test ensures that trailing whitespace is preserved when git.foo( with_raw_output=True ) is called, and vice versa. Signed-off-by: David Aguilar --- test/git/test_git.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/git/test_git.py') diff --git a/test/git/test_git.py b/test/git/test_git.py index 9984e4e0..c20ea7b5 100644 --- a/test/git/test_git.py +++ b/test/git/test_git.py @@ -49,3 +49,9 @@ class TestGit(object): # Note: no trailiing newline assert_equal( "git: 'this-does-not-exist' is not a git-command. See 'git --help'.", self.git.this_does_not_exist(with_stderr=True) ) + + def test_it_does_not_strip_output_when_using_with_raw_output(self): + # Note: trailing newline + assert_equal( "git: 'this-does-not-exist' is not a git-command. See 'git --help'." + os.linesep, + self.git.this_does_not_exist(with_stderr=True, + with_raw_output=True) ) -- cgit v1.2.1