summaryrefslogtreecommitdiff
path: root/tests/sftp.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-07 11:51:17 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-03-07 11:51:17 -0800
commit80b4350918a236711ed193c06998ddc1af523e17 (patch)
treea30065aece8a6f679c79d430f2465a30e0d97769 /tests/sftp.rs
parentc3cdbc762c1b35bd260044870e655e06c75e738c (diff)
downloadssh2-rs-80b4350918a236711ed193c06998ddc1af523e17.zip
Update to rust master
Diffstat (limited to 'tests/sftp.rs')
-rw-r--r--tests/sftp.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/sftp.rs b/tests/sftp.rs
index 774ba86..b28e549 100644
--- a/tests/sftp.rs
+++ b/tests/sftp.rs
@@ -1,5 +1,6 @@
use std::io::prelude::*;
-use std::fs::{self, File, TempDir};
+use std::fs::{self, File};
+use tempdir::TempDir;
#[test]
fn smoke() {
@@ -18,7 +19,8 @@ fn ops() {
sftp.opendir(&td.path().join("bar")).unwrap();
let mut foo = sftp.open(&td.path().join("foo")).unwrap();
sftp.mkdir(&td.path().join("bar2"), 0o755).unwrap();
- assert!(td.path().join("bar2").is_dir());
+ assert_eq!(fs::metadata(&td.path().join("bar2")).map(|m| m.is_dir()),
+ Ok(true));
sftp.rmdir(&td.path().join("bar2")).unwrap();
sftp.create(&td.path().join("foo5")).unwrap().write_all(b"foo").unwrap();