mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Bad rename test
This commit is contained in:
@@ -654,6 +654,9 @@ mod tests {
|
|||||||
let files: Vec<FsEntry> = host.list_dir();
|
let files: Vec<FsEntry> = host.list_dir();
|
||||||
assert_eq!(files.len(), 1); // There should be 0 files now
|
assert_eq!(files.len(), 1); // There should be 0 files now
|
||||||
assert_eq!(get_filename(files.get(0).unwrap()), String::from("bar.txt"));
|
assert_eq!(get_filename(files.get(0).unwrap()), String::from("bar.txt"));
|
||||||
|
// Fail
|
||||||
|
let bad_path: PathBuf = PathBuf::from("/asdailsjoidoewojdijow/ashdiuahu");
|
||||||
|
assert!(host.rename(files.get(0).unwrap(), bad_path.as_path()).is_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ### create_sample_file
|
/// ### create_sample_file
|
||||||
|
|||||||
Reference in New Issue
Block a user