|
@ -21,12 +21,12 @@ mod tests { |
|
|
use std::path::Path;
|
|
|
use std::path::Path;
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
#[test]
|
|
|
fn cd_current() {
|
|
|
|
|
|
|
|
|
fn test_cd_current() {
|
|
|
assert_eq!(Cd.execute(vec![".".to_string()]), Ok(()))
|
|
|
assert_eq!(Cd.execute(vec![".".to_string()]), Ok(()))
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
#[test]
|
|
|
fn cd_not_existent() {
|
|
|
|
|
|
|
|
|
fn test_cd_not_existent() {
|
|
|
// find a path which does not exists
|
|
|
// find a path which does not exists
|
|
|
let mut path = Path::new("test").to_path_buf();
|
|
|
let mut path = Path::new("test").to_path_buf();
|
|
|
while path.exists() {
|
|
|
while path.exists() {
|
|
|