Skip to content

Commit ef805dc

Browse files
committed
test(clitool): add Assert::remove_redactions()
1 parent 9ccd928 commit ef805dc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/clitools.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ impl Assert {
101101
self
102102
}
103103

104+
pub fn remove_redactions(&mut self, vars: impl IntoIterator<Item = &'static str>) -> &mut Self {
105+
for var in vars {
106+
self.redactions
107+
.remove(var)
108+
.expect("invalid redactions detected");
109+
}
110+
self
111+
}
112+
104113
/// Asserts that the command exited with an ok status.
105114
pub fn is_ok(&self) -> &Self {
106115
assert!(self.output.ok);

0 commit comments

Comments
 (0)