From 762c798670a07aa7bb333a09fc094cdb3a184799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Tue, 21 Jan 2020 22:56:12 -0500 Subject: [PATCH] It ls test setup rewrite. (#1260) --- tests/commands/ls.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/commands/ls.rs b/tests/commands/ls.rs index 98b0d252c1..c77ba5aa36 100644 --- a/tests/commands/ls.rs +++ b/tests/commands/ls.rs @@ -73,14 +73,18 @@ fn lists_regular_files_using_question_mark_wildcard() { #[test] fn lists_all_files_in_directories_from_stream() { Playground::setup("ls_test_4", |dirs, sandbox| { - sandbox.mkdir("dir_a").mkdir("dir_b").with_files(vec![ - EmptyFile("root1.txt"), - EmptyFile("root2.txt"), - EmptyFile("dir_a/yehuda.10.txt"), - EmptyFile("dir_a/jonathan.10.txt"), - EmptyFile("dir_b/andres.10.txt"), - EmptyFile("dir_b/chicken_not_to_be_picked_up.100.txt"), - ]); + sandbox + .with_files(vec![EmptyFile("root1.txt"), EmptyFile("root2.txt")]) + .within("dir_a") + .with_files(vec![ + EmptyFile("yehuda.10.txt"), + EmptyFile("jonathan.10.txt"), + ]) + .within("dir_b") + .with_files(vec![ + EmptyFile("andres.10.txt"), + EmptyFile("chicken_not_to_be_picked_up.100.txt"), + ]); let actual = nu!( cwd: dirs.test(), pipeline(