mirror of
https://github.com/nushell/nushell
synced 2025-01-28 04:45:18 +00:00
cp wildcard already supported (documented with test)
This commit is contained in:
parent
357ab46b58
commit
5bfa2cc4b8
1 changed files with 24 additions and 1 deletions
|
@ -146,7 +146,7 @@ fn deep_copies_with_recursive_flag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn copies_using_globs() {
|
fn copies_using_path_with_wildcard() {
|
||||||
let sandbox = Playground::setup_for("cp_test_6").test_dir_name();
|
let sandbox = Playground::setup_for("cp_test_6").test_dir_name();
|
||||||
let expected_copies_path = format!("{}/{}", Playground::root(), sandbox);
|
let expected_copies_path = format!("{}/{}", Playground::root(), sandbox);
|
||||||
|
|
||||||
|
@ -167,3 +167,26 @@ fn copies_using_globs() {
|
||||||
PathBuf::from(&expected_copies_path)
|
PathBuf::from(&expected_copies_path)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn copies_using_a_glob() {
|
||||||
|
let sandbox = Playground::setup_for("cp_test_7").test_dir_name();
|
||||||
|
let expected_copies_path = format!("{}/{}", Playground::root(), sandbox);
|
||||||
|
|
||||||
|
nu!(
|
||||||
|
_output,
|
||||||
|
cwd("tests/fixtures/formats"),
|
||||||
|
"cp * ../nuplayground/cp_test_7"
|
||||||
|
);
|
||||||
|
|
||||||
|
assert!(h::files_exist_at(
|
||||||
|
vec![
|
||||||
|
Path::new("caco3_plastics.csv"),
|
||||||
|
Path::new("cargo_sample.toml"),
|
||||||
|
Path::new("jonathan.xml"),
|
||||||
|
Path::new("sample.ini"),
|
||||||
|
Path::new("sgml_description.json")
|
||||||
|
],
|
||||||
|
PathBuf::from(&expected_copies_path)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue