From: Marco A L Barbosa Date: Mon, 13 Feb 2017 17:34:29 +0000 (-0200) Subject: Pass multiples --test-args to the tester X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~9^2~153^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e6fdcce75f8066b432c53d54fcdccad05b28c5a4;p=cargo.git Pass multiples --test-args to the tester Like --cfg, --test-args accept multiple matches, we should use it and avoid some unexpected behavior joinning the arguments with space. --- diff --git a/src/cargo/ops/cargo_test.rs b/src/cargo/ops/cargo_test.rs index 6c267efb6..a7a4504d3 100644 --- a/src/cargo/ops/cargo_test.rs +++ b/src/cargo/ops/cargo_test.rs @@ -141,8 +141,8 @@ fn run_doc_tests(options: &TestOptions, p.arg("-L").arg(native_dep); } - if test_args.len() > 0 { - p.arg("--test-args").arg(&test_args.join(" ")); + for arg in test_args { + p.arg("--test-args").arg(arg); } if let Some(cfgs) = compilation.cfgs.get(&package.package_id()) {