From 34faaea18926120fa9cd68686fe69d81b81ad4b7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Jan 2017 16:14:13 +0200 Subject: 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. --- build2/test/rule.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build2/test/rule.cxx') 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 (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); -- cgit v1.1