Skip to content

Commit 4adc140

Browse files
build(deps): bump assert_cmd from 2.0.17 to 2.1.1 (#816)
* build(deps): bump assert_cmd from 2.0.17 to 2.1.1 Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 2.0.17 to 2.1.1. - [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md) - [Commits](assert-rs/assert_cmd@v2.0.17...v2.1.1) --- updated-dependencies: - dependency-name: assert_cmd dependency-version: 2.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Use modern functions --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jon C <[email protected]>
1 parent 9698c2c commit 4adc140

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

Cargo.lock

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

clients/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tokio = "1.48"
5050
solana-nonce = "3.0.0"
5151
solana-sdk-ids = "3.0.0"
5252
solana-test-validator = "3.0.0"
53-
assert_cmd = "2.0.17"
53+
assert_cmd = "2.1.1"
5454
libtest-mimic = "0.8"
5555
serial_test = "3.2.0"
5656
tempfile = "3.23.0"

clients/cli/tests/config.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
use assert_cmd::cmd::Command;
1+
use assert_cmd::cargo::cargo_bin_cmd;
22

33
#[test]
44
fn invalid_config_will_cause_commands_to_fail() {
5-
let mut cmd = Command::cargo_bin("spl-token").unwrap();
6-
cmd.args(["address", "--config", "~/nonexistent/config.yml"]);
7-
cmd.assert()
8-
.stderr("error: Could not find config file `~/nonexistent/config.yml`\n");
9-
cmd.assert().code(1).failure();
5+
let output = cargo_bin_cmd!("spl-token")
6+
.args(["address", "--config", "~/nonexistent/config.yml"])
7+
.output()
8+
.unwrap();
9+
assert_eq!(
10+
std::str::from_utf8(&output.stderr).unwrap(),
11+
"error: Could not find config file `~/nonexistent/config.yml`\n"
12+
);
13+
assert_eq!(output.status.code().unwrap(), 1);
14+
assert!(!output.status.success());
1015
}

0 commit comments

Comments
 (0)