diff options
author | Brian Olsen <brian@maven-group.org> | 2017-05-23 22:31:43 +0200 |
---|---|---|
committer | Brian Olsen <brian@maven-group.org> | 2017-05-23 22:31:43 +0200 |
commit | 5e9c8905b1cba55351bd6f4c7ac74725ea7df12f (patch) | |
tree | 917d8b8b7c68f5a4d4ad629a8a16e0e571349de3 /src | |
parent | 0b5d368292bbd4682c767fa6b5b0753d260ae43f (diff) | |
download | ssh2-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')
-rw-r--r-- | src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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()); //! ``` //! |