Allow multiple patterns in ls command (#6098)

* Allow multiple patterns in ls command

* Run formatter

* Comply with style

* Fix format error
This commit is contained in:
Matthew Ma
2022-07-26 11:08:19 -07:00
committed by GitHub
parent b2c466bca6
commit 65f0edd14b
2 changed files with 300 additions and 126 deletions

View File

@ -335,6 +335,28 @@ fn lists_files_including_starting_with_dot() {
})
}
#[test]
fn lists_regular_files_using_multiple_asterisk_wildcards() {
Playground::setup("ls_test_10", |dirs, sandbox| {
sandbox.with_files(vec![
EmptyFile("los.txt"),
EmptyFile("tres.txt"),
EmptyFile("amigos.txt"),
EmptyFile("arepas.clu"),
]);
let actual = nu!(
cwd: dirs.test(), pipeline(
r#"
ls *.txt *.clu
| length
"#
));
assert_eq!(actual.out, "4");
})
}
#[test]
fn list_all_columns() {
Playground::setup("ls_test_all_columns", |dirs, sandbox| {