aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-18 16:14:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-18 16:14:13 +0200
commit34faaea18926120fa9cd68686fe69d81b81ad4b7 (patch)
treeed40a31cbc1dcc9ad5a2a281cccfa71e7ac16abf
parentd402bc96297c6ed3dd6ee883dcff8cc39bd01030 (diff)
Only pass diff --strip-trailing-cr if running on Windows
Since we cannot assume diff on other platforms has this option. Also need to do likewise in the testscript runner.
-rw-r--r--build2/test/rule.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx
index c50f035..1f27979 100644
--- a/build2/test/rule.cxx
+++ b/build2/test/rule.cxx
@@ -658,8 +658,13 @@ namespace build2
dpp = run_search (dp, true);
args.push_back (dpp.recall_string ());
- args.push_back ("--strip-trailing-cr"); //@@ TMP: see init.cxx
args.push_back ("-u");
+
+ // Ignore Windows newline fluff if that's what we are running on.
+ //
+ if (cast<target_triplet> (tt["test.target"]).class_ == "windows")
+ args.push_back ("--strip-trailing-cr");
+
args.push_back (ot.path ().string ().c_str ());
args.push_back ("-");
args.push_back (nullptr);