OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include "tools/gn/exec_process.h" |
| 6 |
5 #include "base/command_line.h" | 7 #include "base/command_line.h" |
6 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
7 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "build/build_config.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "tools/gn/exec_process.h" | |
10 | 12 |
11 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
12 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
13 #endif | 15 #endif |
14 | 16 |
15 namespace internal { | 17 namespace internal { |
16 | 18 |
17 // TODO(cjhopman): Enable these tests when windows ExecProcess handles stderr. | 19 // TODO(cjhopman): Enable these tests when windows ExecProcess handles stderr. |
18 // 'python' is not runnable on Windows. Adding ["cmd", "/c"] fails because | 20 // 'python' is not runnable on Windows. Adding ["cmd", "/c"] fails because |
19 // CommandLine does unusual reordering of args. | 21 // CommandLine does unusual reordering of args. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 "import sys; sys.stdout.close(); print >>sys.stderr, 'e' * 10000", | 121 "import sys; sys.stdout.close(); print >>sys.stderr, 'e' * 10000", |
120 &std_out, | 122 &std_out, |
121 &std_err, | 123 &std_err, |
122 &exit_code)); | 124 &exit_code)); |
123 EXPECT_EQ(0, exit_code); | 125 EXPECT_EQ(0, exit_code); |
124 EXPECT_EQ(0u, std_out.size()); | 126 EXPECT_EQ(0u, std_out.size()); |
125 EXPECT_EQ(10001u, std_err.size()); | 127 EXPECT_EQ(10001u, std_err.size()); |
126 } | 128 } |
127 #endif | 129 #endif |
128 } // namespace internal | 130 } // namespace internal |
OLD | NEW |