Skip to content

Commit a3c5f96

Browse files
committed
update assert_cmd, fix #191
1 parent d72fd99 commit a3c5f96

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ num_cpus = "1.15.0"
2929
bpaf = { version = "0.9.16", features = ["derive"] }
3030

3131
[dev-dependencies]
32-
assert_cmd = "2.0.2"
32+
assert_cmd = "2.1.1"
3333
assert_fs = "1.0.2"
3434
insta = { version = "1.42.1", features = ["filters"] }
3535
insta-cmd = "0.6.0"

tests/cli.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
use assert_cmd::Command;
1+
use assert_cmd::{cargo, prelude::*};
22
use assert_fs::prelude::*;
33
use predicates::prelude::*;
4+
use std::process::Command;
45

56
#[test]
67
fn test_dead_link() {
78
let site = assert_fs::TempDir::new().unwrap();
89
site.child("index.html")
910
.write_str("<a href=bar.html>")
1011
.unwrap();
11-
let mut cmd = Command::cargo_bin("hyperlink").unwrap();
12+
let mut cmd = Command::new(cargo::cargo_bin!("hyperlink"));
1213
cmd.current_dir(site.path()).arg(".");
1314

1415
cmd.assert().failure().code(1).stdout(
@@ -33,7 +34,7 @@ fn test_dead_anchor() {
3334
.write_str("<a href=bar.html#goo>")
3435
.unwrap();
3536
site.child("bar.html").touch().unwrap();
36-
let mut cmd = Command::cargo_bin("hyperlink").unwrap();
37+
let mut cmd = Command::new(cargo::cargo_bin!("hyperlink"));
3738
cmd.current_dir(site.path()).arg(".").arg("--check-anchors");
3839

3940
cmd.assert().failure().code(2).stdout(
@@ -54,7 +55,7 @@ $"#,
5455

5556
#[test]
5657
fn test_bad_dir() {
57-
let mut cmd = Command::cargo_bin("hyperlink").unwrap();
58+
let mut cmd = Command::new(cargo::cargo_bin!("hyperlink"));
5859
cmd.arg("non_existing_dir");
5960

6061
cmd.assert()

0 commit comments

Comments
 (0)