mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 03:58:28 +02:00
More descriptive test playground names for commands other than the basic ones.
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user