diff options
author | Jeremy Apthorp <jeremya@chromium.org> | 2012-01-04 23:00:24 (GMT) |
---|---|---|
committer | Jeremy Apthorp <jeremya@chromium.org> | 2012-01-04 23:01:00 (GMT) |
commit | c74e70c2d865be8fc19affb390ea0704fa3eea50 (patch) | |
tree | 9c4c18c8ec91cc49e1eb4d55e55890b483afbcab /src | |
parent | c46f3cbd7f9706437392dcfa9df27341aadb1b37 (diff) | |
download | Ninja-c74e70c2d865be8fc19affb390ea0704fa3eea50.zip Ninja-c74e70c2d865be8fc19affb390ea0704fa3eea50.tar.gz Ninja-c74e70c2d865be8fc19affb390ea0704fa3eea50.tar.bz2 |
Add a test for quoting spaces in expanded $in and $out.
Diffstat (limited to 'src')
-rw-r--r-- | src/graph_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/graph_test.cc b/src/graph_test.cc index c1a0f93..07a1936 100644 --- a/src/graph_test.cc +++ b/src/graph_test.cc @@ -131,3 +131,12 @@ TEST_F(GraphTest, RootNodes) { EXPECT_EQ("out", name.substr(0, 3)); } } + +TEST_F(GraphTest, VarInOutQuoteSpaces) { + ASSERT_NO_FATAL_FAILURE(AssertParse(&state_, +"build a$ b: cat nospace with$ space nospace2\n")); + + Edge* edge = GetNode("a b")->in_edge(); + EXPECT_EQ("cat nospace \"with space\" nospace2 > \"a b\"", + edge->EvaluateCommand()); +} |