diff --git a/src/builtins/cd.rs b/src/builtins/cd.rs index c840d80..a4ba4d9 100644 --- a/src/builtins/cd.rs +++ b/src/builtins/cd.rs @@ -14,3 +14,13 @@ impl Builtin for Cd { set_current_dir(first).map_err(|e| ShellError::ExecuteFailure(e.to_string())) } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn cd_current() { + assert_eq!(Cd.execute(vec![".".to_string()]), Ok(())) + } +}