More descriptive test playground names for commands other than the basic ones.

This commit is contained in:
Andrés N. Robalino
2019-08-14 15:07:08 -05:00
parent bd71773b5b
commit dfcbaed1c6
5 changed files with 27 additions and 50 deletions

View File

@ -116,8 +116,10 @@ impl Playground {
}
}
pub fn cd(&mut self, path: &str) -> &mut Self {
self.cwd.push(path);
pub fn mkdir(&mut self, directory: &str) -> &mut Self {
self.cwd.push(directory);
std::fs::create_dir_all(&self.cwd).expect("can not create directory");
self.back_to_playground();
self
}
@ -148,6 +150,7 @@ impl Playground {
self
}
pub fn glob_vec(pattern: &str) -> Vec<PathBuf> {
glob(pattern).unwrap().map(|r| r.unwrap()).collect()
}