|
1 | 1 | use std::{ |
2 | 2 | env, fs, |
3 | 3 | io::{BufRead, BufReader}, |
4 | | - process::{Command, Stdio}, |
| 4 | + process::Stdio, |
5 | 5 | sync::mpsc, |
6 | 6 | thread, |
7 | 7 | time::Duration, |
8 | 8 | }; |
9 | 9 |
|
10 | 10 | use anyhow::Result; |
11 | | -use assert_cmd::cargo::CommandCargoExt; |
12 | 11 | use insta::assert_snapshot; |
13 | 12 |
|
14 | | -use crate::common::{get_fixture, get_test_cmd, BIN_NAME}; |
| 13 | +use crate::common::{get_fixture, get_test_cmd, get_test_process_cmd}; |
15 | 14 |
|
16 | 15 | mod common; |
17 | 16 |
|
@@ -329,7 +328,7 @@ fn patterns_test_watch_mode_case_patterns_changed() -> Result<()> { |
329 | 328 | let temp_dir_path = temp_dir.path().to_owned(); |
330 | 329 |
|
331 | 330 | let _cmd_handle = thread::spawn(move || { |
332 | | - let mut cmd = Command::cargo_bin(BIN_NAME) |
| 331 | + let mut cmd = get_test_process_cmd() |
333 | 332 | .unwrap() |
334 | 333 | .args(&["patterns", "test", "--watch"]) |
335 | 334 | .current_dir(&temp_dir_path) |
@@ -381,7 +380,7 @@ fn patterns_test_watch_mode_case_no_pattern_to_test() -> Result<()> { |
381 | 380 | let temp_dir_path = temp_dir.path().to_owned(); |
382 | 381 |
|
383 | 382 | let _cmd_handle = thread::spawn(move || { |
384 | | - let mut cmd = Command::cargo_bin(BIN_NAME) |
| 383 | + let mut cmd = get_test_process_cmd() |
385 | 384 | .unwrap() |
386 | 385 | .args(&["patterns", "test", "--watch"]) |
387 | 386 | .current_dir(&temp_dir_path) |
|
0 commit comments