22 TEST(EscapeForDepfileTest, SpacesInFilename) {
23 ASSERT_EQ(
"sub\\some\\ sdk\\foo.h",
27 TEST(MSVCHelperTest, EnvBlock) {
28 char env_block[] =
"foo=bar\0";
32 cl.
Run(
"cmd /c \"echo foo is %foo%", &output);
33 ASSERT_EQ(
"foo is bar\r\n", output);
36 TEST(MSVCHelperTest, NoReadOfStderr) {
39 cl.
Run(
"cmd /c \"echo to stdout&& echo to stderr 1>&2", &output);
40 ASSERT_EQ(
"to stdout\r\n", output);
string EscapeForDepfile(const string &path)
TEST(EscapeForDepfileTest, SpacesInFilename)
Wraps a synchronous execution of a CL subprocess.
int Run(const std::string &command, std::string *output)
Start a process and gather its raw output.
void SetEnvBlock(void *env_block)
Set the environment block (as suitable for CreateProcess) to be used by Run().