summaryrefslogtreecommitdiff
path: root/subplotlib/src/steplibrary/runcmd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'subplotlib/src/steplibrary/runcmd.rs')
-rw-r--r--subplotlib/src/steplibrary/runcmd.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/subplotlib/src/steplibrary/runcmd.rs b/subplotlib/src/steplibrary/runcmd.rs
index 6692441..99605a3 100644
--- a/subplotlib/src/steplibrary/runcmd.rs
+++ b/subplotlib/src/steplibrary/runcmd.rs
@@ -353,7 +353,7 @@ pub fn exit_code_is(context: &Runcmd, exit: i32) {
#[step]
pub fn exit_code_is_not(context: &Runcmd, exit: i32) {
if context.exitcode.is_none() || context.exitcode == Some(exit) {
- throw!(format!("Expected exit code to not equal {}", exit));
+ throw!(format!("Expected exit code to not equal {exit}"));
}
}
@@ -422,7 +422,7 @@ fn check_matches(runcmd: &Runcmd, which: Stream, how: MatchKind, against: &str)
#[step]
pub fn stdout_is(runcmd: &Runcmd, text: &str) {
if !check_matches(runcmd, Stream::Stdout, MatchKind::Exact, text)? {
- throw!(format!("stdout is not {:?}", text));
+ throw!(format!("stdout is not {text:?}"));
}
}
@@ -435,7 +435,7 @@ pub fn stdout_is(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stdout_isnt(runcmd: &Runcmd, text: &str) {
if check_matches(runcmd, Stream::Stdout, MatchKind::Exact, text)? {
- throw!(format!("stdout is exactly {:?}", text));
+ throw!(format!("stdout is exactly {text:?}"));
}
}
@@ -448,7 +448,7 @@ pub fn stdout_isnt(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stderr_is(runcmd: &Runcmd, text: &str) {
if !check_matches(runcmd, Stream::Stderr, MatchKind::Exact, text)? {
- throw!(format!("stderr is not {:?}", text));
+ throw!(format!("stderr is not {text:?}"));
}
}
@@ -461,7 +461,7 @@ pub fn stderr_is(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stderr_isnt(runcmd: &Runcmd, text: &str) {
if check_matches(runcmd, Stream::Stderr, MatchKind::Exact, text)? {
- throw!(format!("stderr is exactly {:?}", text));
+ throw!(format!("stderr is exactly {text:?}"));
}
}
@@ -474,7 +474,7 @@ pub fn stderr_isnt(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stdout_contains(runcmd: &Runcmd, text: &str) {
if !check_matches(runcmd, Stream::Stdout, MatchKind::Contains, text)? {
- throw!(format!("stdout does not contain {:?}", text));
+ throw!(format!("stdout does not contain {text:?}"));
}
}
@@ -487,7 +487,7 @@ pub fn stdout_contains(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stdout_doesnt_contain(runcmd: &Runcmd, text: &str) {
if check_matches(runcmd, Stream::Stdout, MatchKind::Contains, text)? {
- throw!(format!("stdout contains {:?}", text));
+ throw!(format!("stdout contains {text:?}"));
}
}
@@ -500,7 +500,7 @@ pub fn stdout_doesnt_contain(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stderr_contains(runcmd: &Runcmd, text: &str) {
if !check_matches(runcmd, Stream::Stderr, MatchKind::Contains, text)? {
- throw!(format!("stderr does not contain {:?}", text));
+ throw!(format!("stderr does not contain {text:?}"));
}
}
@@ -513,7 +513,7 @@ pub fn stderr_contains(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stderr_doesnt_contain(runcmd: &Runcmd, text: &str) {
if check_matches(runcmd, Stream::Stderr, MatchKind::Contains, text)? {
- throw!(format!("stderr contains {:?}", text));
+ throw!(format!("stderr contains {text:?}"));
}
}
@@ -527,7 +527,7 @@ pub fn stderr_doesnt_contain(runcmd: &Runcmd, text: &str) {
#[step]
pub fn stdout_matches_regex(runcmd: &Runcmd, regex: &str) {
if !check_matches(runcmd, Stream::Stdout, MatchKind::Regex, regex)? {
- throw!(format!("stdout does not match {:?}", regex));
+ throw!(format!("stdout does not match {regex:?}"));
}
}
@@ -541,7 +541,7 @@ pub fn stdout_matches_regex(runcmd: &Runcmd, regex: &str) {
#[step]
pub fn stdout_doesnt_match_regex(runcmd: &Runcmd, regex: &str) {
if check_matches(runcmd, Stream::Stdout, MatchKind::Regex, regex)? {
- throw!(format!("stdout matches {:?}", regex));
+ throw!(format!("stdout matches {regex:?}"));
}
}
@@ -555,7 +555,7 @@ pub fn stdout_doesnt_match_regex(runcmd: &Runcmd, regex: &str) {
#[step]
pub fn stderr_matches_regex(runcmd: &Runcmd, regex: &str) {
if !check_matches(runcmd, Stream::Stderr, MatchKind::Regex, regex)? {
- throw!(format!("stderr does not match {:?}", regex));
+ throw!(format!("stderr does not match {regex:?}"));
}
}
@@ -569,6 +569,6 @@ pub fn stderr_matches_regex(runcmd: &Runcmd, regex: &str) {
#[step]
pub fn stderr_doesnt_match_regex(runcmd: &Runcmd, regex: &str) {
if check_matches(runcmd, Stream::Stderr, MatchKind::Regex, regex)? {
- throw!(format!("stderr matches {:?}", regex));
+ throw!(format!("stderr matches {regex:?}"));
}
}