aboutsummaryrefslogtreecommitdiff
path: root/src/tests/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/mod.rs')
-rw-r--r--src/tests/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs
index 5ebf285..ac420f2 100644
--- a/src/tests/mod.rs
+++ b/src/tests/mod.rs
@@ -50,6 +50,13 @@ where
{
fn unwrap_str_err(self) -> String {
match self.unwrap_err() {
+ crate::Error::ClapError(err) => {
+ if err.use_stderr() {
+ err.message
+ } else {
+ String::new()
+ }
+ }
crate::Error::Error(err) => err,
err => panic!("Unexpected error variant found: {:?}", err),
}