Skip to content

Commit 003b96e

Browse files
ericktdjc
authored andcommitted
Check for unexpected output if examples fail
1 parent 81e75a4 commit 003b96e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/tests.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ fn client() {
5757
.output()
5858
.expect("cannot run client example");
5959

60-
assert!(rc.status.success());
60+
if !rc.status.success() {
61+
assert_eq!(String::from_utf8_lossy(&rc.stdout), "");
62+
assert_eq!(String::from_utf8_lossy(&rc.stderr), "");
63+
panic!("test failed");
64+
}
6165
}
6266

6367
#[test]
@@ -104,6 +108,7 @@ fn custom_ca_store() {
104108

105109
if !rc.status.success() {
106110
assert_eq!(String::from_utf8_lossy(&rc.stdout), "");
111+
assert_eq!(String::from_utf8_lossy(&rc.stderr), "");
107112
panic!("test failed");
108113
}
109114
}

0 commit comments

Comments
 (0)