mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Removed eprintln! in ftp file transfer causing break when on Windows
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1322,7 +1322,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "termscp"
|
name = "termscp"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"bytesize",
|
"bytesize",
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ mod tests {
|
|||||||
// Parse
|
// Parse
|
||||||
let deserializer: ConfigSerializer = ConfigSerializer {};
|
let deserializer: ConfigSerializer = ConfigSerializer {};
|
||||||
let cfg = deserializer.deserialize(Box::new(toml_file));
|
let cfg = deserializer.deserialize(Box::new(toml_file));
|
||||||
println!("{:?}", cfg);
|
|
||||||
assert!(cfg.is_ok());
|
assert!(cfg.is_ok());
|
||||||
let cfg: UserConfig = cfg.ok().unwrap();
|
let cfg: UserConfig = cfg.ok().unwrap();
|
||||||
// Verify configuration
|
// Verify configuration
|
||||||
@@ -141,7 +140,6 @@ mod tests {
|
|||||||
// Parse
|
// Parse
|
||||||
let deserializer: ConfigSerializer = ConfigSerializer {};
|
let deserializer: ConfigSerializer = ConfigSerializer {};
|
||||||
let cfg = deserializer.deserialize(Box::new(toml_file));
|
let cfg = deserializer.deserialize(Box::new(toml_file));
|
||||||
println!("{:?}", cfg);
|
|
||||||
assert!(cfg.is_ok());
|
assert!(cfg.is_ok());
|
||||||
let cfg: UserConfig = cfg.ok().unwrap();
|
let cfg: UserConfig = cfg.ok().unwrap();
|
||||||
// Verify configuration
|
// Verify configuration
|
||||||
|
|||||||
@@ -228,7 +228,6 @@ impl FtpFileTransfer {
|
|||||||
}),
|
}),
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
eprintln!("{:?};{:?}", is_dir, symlink);
|
|
||||||
let mut abs_path: PathBuf = PathBuf::from(path);
|
let mut abs_path: PathBuf = PathBuf::from(path);
|
||||||
abs_path.push(file_name.as_str());
|
abs_path.push(file_name.as_str());
|
||||||
let abs_path: PathBuf = Self::resolve(abs_path.as_path());
|
let abs_path: PathBuf = Self::resolve(abs_path.as_path());
|
||||||
@@ -1111,7 +1110,6 @@ mod tests {
|
|||||||
// Pwd
|
// Pwd
|
||||||
assert_eq!(ftp.pwd().ok().unwrap(), PathBuf::from("/"));
|
assert_eq!(ftp.pwd().ok().unwrap(), PathBuf::from("/"));
|
||||||
// List dir
|
// List dir
|
||||||
println!("{:?}", ftp.list_dir(PathBuf::from("/").as_path()));
|
|
||||||
let files: Vec<FsEntry> = ftp.list_dir(PathBuf::from("/").as_path()).ok().unwrap();
|
let files: Vec<FsEntry> = ftp.list_dir(PathBuf::from("/").as_path()).ok().unwrap();
|
||||||
// There should be at least 1 file
|
// There should be at least 1 file
|
||||||
assert!(files.len() > 0);
|
assert!(files.len() > 0);
|
||||||
@@ -1130,7 +1128,6 @@ mod tests {
|
|||||||
// Pwd
|
// Pwd
|
||||||
assert_eq!(ftp.pwd().ok().unwrap(), PathBuf::from("/"));
|
assert_eq!(ftp.pwd().ok().unwrap(), PathBuf::from("/"));
|
||||||
// List dir
|
// List dir
|
||||||
println!("{:?}", ftp.list_dir(PathBuf::from("/").as_path()));
|
|
||||||
let files: Vec<FsEntry> = ftp.list_dir(PathBuf::from("/").as_path()).ok().unwrap();
|
let files: Vec<FsEntry> = ftp.list_dir(PathBuf::from("/").as_path()).ok().unwrap();
|
||||||
// There should be at least 1 file
|
// There should be at least 1 file
|
||||||
assert!(files.len() > 0);
|
assert!(files.len() > 0);
|
||||||
|
|||||||
@@ -898,7 +898,6 @@ mod tests {
|
|||||||
// Get dir
|
// Get dir
|
||||||
let host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap();
|
let host: Localhost = Localhost::new(PathBuf::from(tmpdir.path())).ok().unwrap();
|
||||||
let files: Vec<FsEntry> = host.list_dir();
|
let files: Vec<FsEntry> = host.list_dir();
|
||||||
println!("Entries {:?}", files);
|
|
||||||
// Verify files
|
// Verify files
|
||||||
let file_0: &FsEntry = files.get(0).unwrap();
|
let file_0: &FsEntry = files.get(0).unwrap();
|
||||||
match file_0 {
|
match file_0 {
|
||||||
@@ -1122,7 +1121,6 @@ mod tests {
|
|||||||
// Verify dir_dest contains foo.txt
|
// Verify dir_dest contains foo.txt
|
||||||
let mut test_file_path: PathBuf = dir_dest.clone();
|
let mut test_file_path: PathBuf = dir_dest.clone();
|
||||||
test_file_path.push("foo.txt");
|
test_file_path.push("foo.txt");
|
||||||
println!("{:?}", host.scan_dir(tmpdir.path()).ok().unwrap());
|
|
||||||
assert!(host.stat(test_file_path.as_path()).is_ok());
|
assert!(host.stat(test_file_path.as_path()).is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -525,7 +525,6 @@ mod tests {
|
|||||||
// Iterate keys
|
// Iterate keys
|
||||||
for key in client.iter_ssh_keys() {
|
for key in client.iter_ssh_keys() {
|
||||||
let host: SshHost = client.get_ssh_key(key).ok().unwrap().unwrap();
|
let host: SshHost = client.get_ssh_key(key).ok().unwrap().unwrap();
|
||||||
println!("{:?}", host);
|
|
||||||
assert_eq!(host.0, String::from("192.168.1.31"));
|
assert_eq!(host.0, String::from("192.168.1.31"));
|
||||||
assert_eq!(host.1, String::from("pi"));
|
assert_eq!(host.1, String::from("pi"));
|
||||||
let mut expected_key_path: PathBuf = key_path.clone();
|
let mut expected_key_path: PathBuf = key_path.clone();
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ mod tests {
|
|||||||
fn test_ui_layout_utils_draw_area_in() {
|
fn test_ui_layout_utils_draw_area_in() {
|
||||||
let area: Rect = Rect::new(0, 0, 1024, 512);
|
let area: Rect = Rect::new(0, 0, 1024, 512);
|
||||||
let child: Rect = draw_area_in(area, 75, 30);
|
let child: Rect = draw_area_in(area, 75, 30);
|
||||||
println!("{:?}", child);
|
|
||||||
assert_eq!(child.x, 43);
|
assert_eq!(child.x, 43);
|
||||||
assert_eq!(child.y, 63);
|
assert_eq!(child.y, 63);
|
||||||
assert_eq!(child.width, 271);
|
assert_eq!(child.width, 271);
|
||||||
|
|||||||
Reference in New Issue
Block a user