tests: add a test for the new with_raw_output mechanism
authorDavid Aguilar <davvid@gmail.com>
Thu, 29 May 2008 09:19:18 +0000 (02:19 -0700)
committerDavid Aguilar <davvid@gmail.com>
Thu, 29 May 2008 09:19:18 +0000 (02:19 -0700)
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 <davvid@gmail.com>
test/git/test_git.py

index 9984e4e0653a826cb8e94737254145af37e79a25..c20ea7b5ecb21abbc1c8267354b453d183e8eb9e 100644 (file)
@@ -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) )