summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorBrian Olsen <brian@maven-group.org>2017-05-23 22:31:43 +0200
committerBrian Olsen <brian@maven-group.org>2017-05-23 22:31:43 +0200
commit5e9c8905b1cba55351bd6f4c7ac74725ea7df12f (patch)
tree917d8b8b7c68f5a4d4ad629a8a16e0e571349de3 /src/lib.rs
parent0b5d368292bbd4682c767fa6b5b0753d260ae43f (diff)
downloadssh2-rs-5e9c8905b1cba55351bd6f4c7ac74725ea7df12f.zip
Fix exit_status example
In the example in the documentation that calls exit_status and in the smoke integration test exit_status is called before the channel is closed and it will therefore always return Ok(0). I have fixed this by calling wait_close() first and by adding a bad_smoke test that calls false and checks that the exit_status is 1.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 580d5d6..9a81cc7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -80,6 +80,7 @@
//! let mut s = String::new();
//! channel.read_to_string(&mut s).unwrap();
//! println!("{}", s);
+//! channel.wait_close();
//! println!("{}", channel.exit_status().unwrap());
//! ```
//!