Added test for ls -a (#2582)

This commit is contained in:
Matt Clarke 2020-09-21 09:56:37 +02:00 committed by GitHub
parent a508e15efe
commit 332e12ded0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,6 +252,30 @@ fn lists_all_hidden_files_when_glob_does_not_contain_dot() {
}) })
} }
#[test]
fn lists_files_including_starting_with_dot() {
Playground::setup("ls_test_9", |dirs, sandbox| {
sandbox.with_files(vec![
EmptyFile("yehuda.txt"),
EmptyFile("jonathan.txt"),
EmptyFile("andres.txt"),
EmptyFile(".hidden1.txt"),
EmptyFile(".hidden2.txt"),
]);
let actual = nu!(
cwd: dirs.test(), pipeline(
r#"
ls -a
| count
| echo $it
"#
));
assert_eq!(actual.out, "5");
})
}
#[test] #[test]
fn list_all_columns() { fn list_all_columns() {
Playground::setup( Playground::setup(