Skip to content

Commit e6fdcce

Browse files
committed
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.
1 parent 6f1b860 commit e6fdcce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/ops/cargo_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ fn run_doc_tests(options: &TestOptions,
141141
p.arg("-L").arg(native_dep);
142142
}
143143

144-
if test_args.len() > 0 {
145-
p.arg("--test-args").arg(&test_args.join(" "));
144+
for arg in test_args {
145+
p.arg("--test-args").arg(arg);
146146
}
147147

148148
if let Some(cfgs) = compilation.cfgs.get(&package.package_id()) {

0 commit comments

Comments
 (0)