diff options
-rw-r--r--[-rwxr-xr-x] | misc/output_test.py | 5 | ||||
-rw-r--r-- | src/util.cc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/misc/output_test.py b/misc/output_test.py index 6858e21..45698f1 100755..100644 --- a/misc/output_test.py +++ b/misc/output_test.py @@ -119,6 +119,7 @@ red def test_status(self): self.assertEqual(run(''), 'ninja: no work to do.\n') + self.assertEqual(run('', pipe=True), 'ninja: no work to do.\n') def test_ninja_status_default(self): 'Do we show the default status by default?' @@ -129,5 +130,9 @@ red output = run(Output.BUILD_SIMPLE_ECHO, flags='--quiet') self.assertEqual(output, 'do thing\n') + def test_entering_directory_on_stdout(self): + output = run(Output.BUILD_SIMPLE_ECHO, flags='-C$PWD', pipe=True) + self.assertEqual(output.splitlines()[0][:25], "ninja: Entering directory") + if __name__ == '__main__': unittest.main() diff --git a/src/util.cc b/src/util.cc index b40a636..f34656c 100644 --- a/src/util.cc +++ b/src/util.cc @@ -105,9 +105,9 @@ void Error(const char* msg, ...) { } void Info(const char* msg, va_list ap) { - fprintf(stderr, "ninja: "); - vfprintf(stderr, msg, ap); - fprintf(stderr, "\n"); + fprintf(stdout, "ninja: "); + vfprintf(stdout, msg, ap); + fprintf(stdout, "\n"); } void Info(const char* msg, ...) { |