summaryrefslogtreecommitdiff
path: root/tests/all.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-18 13:17:24 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-18 13:17:24 -0700
commitc95e6ea1e74f82f1a889302978e37a7baf4073cf (patch)
tree4c09a436ede27b29c712e7151cc17917cd3a9e4f /tests/all.rs
parent547e6c2679e8c686a51367b95a2bab272c51beb0 (diff)
downloadssh2-rs-c95e6ea1e74f82f1a889302978e37a7baf4073cf.zip
Split things up and write some docs
Diffstat (limited to 'tests/all.rs')
-rw-r--r--tests/all.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/all.rs b/tests/all.rs
new file mode 100644
index 0000000..90473a3
--- /dev/null
+++ b/tests/all.rs
@@ -0,0 +1,20 @@
+extern crate ssh2;
+extern crate native;
+extern crate rustrt;
+
+use rustrt::rtio::{SocketAddr, Ipv4Addr};
+use native::io::net::TcpStream;
+
+mod agent;
+mod session;
+
+pub fn socket() -> TcpStream {
+ let stream = TcpStream::connect(SocketAddr {
+ ip: Ipv4Addr(127, 0, 0, 1),
+ port: 22,
+ }, None);
+ match stream {
+ Ok(s) => s,
+ Err(e) => fail!("no socket: [{}]: {}", e.code, e.detail),
+ }
+}