mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Send only absolute paths to uu_mv (#11576)
# Description Fixes: #11127 It's something similar to #11080, applying the same logic to `uu_mv`. # User-Facing Changes # After Submitting
This commit is contained in:
@ -592,3 +592,18 @@ fn mv_files_with_glob_metachars(#[case] src_name: &str) {
|
||||
fn mv_files_with_glob_metachars_nw(#[case] src_name: &str) {
|
||||
mv_files_with_glob_metachars(src_name);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mv_with_cd() {
|
||||
Playground::setup("umv_test_17", |_dirs, sandbox| {
|
||||
sandbox
|
||||
.mkdir("tmp_dir")
|
||||
.with_files(vec![FileWithContent("tmp_dir/file.txt", "body")]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: sandbox.cwd(),
|
||||
r#"do { cd tmp_dir; let f = 'file.txt'; umv $f .. }; open file.txt"#,
|
||||
);
|
||||
assert!(actual.out.contains("body"));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user