commit | a4dfe75ed456e3c2986af048df6aa44a01a54922 | [log] [tgz] |
---|---|---|
author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | Tue Jul 28 15:54:36 2015 +0900 |
committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | Wed Jul 29 12:53:35 2015 +0900 |
tree | 87dc0161d89346955ee771ca815b0c4921928ea9 | |
parent | 48ac8ae4ecb572659b2d47ef0ba78f6e728e4e2e [diff] |
[C++] Fix line concatenation for ninja
diff --git a/ninja.cc b/ninja.cc index a0ac9b7..8df5e19 100644 --- a/ninja.cc +++ b/ninja.cc
@@ -236,7 +236,7 @@ case '\n': if (prev_backslash) { - (*cmd_buf)[cmd_buf->size()-1] = ' '; + cmd_buf->resize(cmd_buf->size()-1); } else { *cmd_buf += ' '; }
diff --git a/testcase/backslash_before_special_character.mk b/testcase/backslash_before_special_character.mk index b5e9073..8c27d76 100644 --- a/testcase/backslash_before_special_character.mk +++ b/testcase/backslash_before_special_character.mk
@@ -1,2 +1,3 @@ + test: echo \ " #"
diff --git a/testcase/backslash_in_rule_command.mk b/testcase/backslash_in_rule_command.mk index 5aed23e..895d48b 100644 --- a/testcase/backslash_in_rule_command.mk +++ b/testcase/backslash_in_rule_command.mk
@@ -1,4 +1,2 @@ -# TODO(c-ninja): Fix: should echo "foobar", but c-ninja echo "foo bar" - test:;echo foo\ bar
diff --git a/testcase/semicolon_in_var.mk b/testcase/semicolon_in_var.mk index 4209537..a3ea4b9 100644 --- a/testcase/semicolon_in_var.mk +++ b/testcase/semicolon_in_var.mk
@@ -1,5 +1,3 @@ -# TODO(c-ninja): Fix - test: foo bar baz bazz A:=foo: ; echo PASS $(A)