mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
@ -607,5 +607,9 @@ fn copy_file_with_update_flag_impl(progress: bool) {
|
||||
sandbox.with_files(vec![FileWithContent("newest_valid.txt", "newest_body")]);
|
||||
let actual = nu!(cwd: sandbox.cwd(), "cp {} -u newest_valid.txt valid.txt; open valid.txt", progress_flag);
|
||||
assert_eq!(actual.out, "newest_body");
|
||||
|
||||
// when destination doesn't exist
|
||||
let actual = nu!(cwd: sandbox.cwd(), "cp {} -u newest_valid.txt des_missing.txt; open des_missing.txt", progress_flag);
|
||||
assert_eq!(actual.out, "newest_body");
|
||||
});
|
||||
}
|
||||
|
@ -484,5 +484,10 @@ fn mv_with_update_flag() {
|
||||
sandbox.with_files(vec![FileWithContent("newest_valid.txt", "newest_body")]);
|
||||
let actual = nu!(cwd: sandbox.cwd(), "mv -uf newest_valid.txt valid.txt; open valid.txt");
|
||||
assert_eq!(actual.out, "newest_body");
|
||||
|
||||
// when destination doesn't exist
|
||||
sandbox.with_files(vec![FileWithContent("newest_valid.txt", "newest_body")]);
|
||||
let actual = nu!(cwd: sandbox.cwd(), "mv -uf newest_valid.txt des_missing.txt; open des_missing.txt");
|
||||
assert_eq!(actual.out, "newest_body");
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user