diff options
author | Ondřej Čertík <ondrej@certik.us> | 2020-01-27 18:52:22 -0700 |
---|---|---|
committer | Ondřej Čertík <ondrej@certik.us> | 2020-01-27 18:52:22 -0700 |
commit | d8dcf8ba8f59bf9ddeaab942028f236cfe62c98b (patch) | |
tree | 3a07f6f639868e3998cead290b0e51fd6ba3418c /tests/cli.rs | |
parent | 3ca76f09989c26b1964e669efba941d0ba41129e (diff) | |
download | fpm-d8dcf8ba8f59bf9ddeaab942028f236cfe62c98b.tar.gz fpm-d8dcf8ba8f59bf9ddeaab942028f236cfe62c98b.zip |
Use Command::new() instead of Command::cargo_new()
This seems to actually fix the issue #16 as documented at:
https://users.rust-lang.org/t/github-actions-randomly-kill-a-test-program/37255/6
Diffstat (limited to 'tests/cli.rs')
-rw-r--r-- | tests/cli.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/cli.rs b/tests/cli.rs index 3573113..38b0419 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -45,7 +45,7 @@ impl Success2 for Assert { #[test] fn test_help() { - let mut cmd = Command::cargo_bin("fpm").unwrap(); + let mut cmd = Command::new("./target/debug/fpm"); cmd.arg("--help"); cmd.assert() .success2() @@ -56,7 +56,7 @@ fn test_help() { #[test] fn test_1() { - let mut build = Command::cargo_bin("fpm").unwrap(); + let mut build = Command::new("./target/debug/fpm"); build.arg("build") .arg("--target-dir") .arg("build-test") @@ -66,7 +66,7 @@ fn test_1() { .stdout(predicate::str::contains("Built target p1") .and(predicate::str::contains("TEST1 OK").not())); - let mut run = Command::cargo_bin("fpm").unwrap(); + let mut run = Command::new("./target/debug/fpm"); run.arg("run") .current_dir("tests/1"); run.assert() @@ -76,7 +76,7 @@ fn test_1() { #[test] fn test_2() { - let mut build = Command::cargo_bin("fpm").unwrap(); + let mut build = Command::new("./target/debug/fpm"); build.arg("build") .arg("--target-dir") .arg("build-test") @@ -86,7 +86,7 @@ fn test_2() { .stdout(predicate::str::contains("Built target p1") .and(predicate::str::contains("TEST2 OK").not())); - let mut run = Command::cargo_bin("fpm").unwrap(); + let mut run = Command::new("./target/debug/fpm"); run.arg("run") .current_dir("tests/2"); run.assert() |