use super::pathconv::path_to_vector as to_vector;
use super::remove_start_dot_slash;
#[test]
fn remove_nothing() {
let mut p = to_vector("nothing/here");
remove_start_dot_slash(&mut p, '/');
assert_eq!(p, to_vector("nothing/here"));
}
#[test]
fn remove_start_dot_slash_test() {
let mut p = to_vector("./nothing/here");
remove_start_dot_slash(&mut p, '/');
assert_eq!(p, to_vector("nothing/here"));
}
#[test]
fn remove_double_start_dot_slash_test() {
let mut p = to_vector("././nothing/here");
remove_start_dot_slash(&mut p, '/');
assert_eq!(p, to_vector("nothing/here"));
}
#[test]
fn too_short() {
let mut p = to_vector("/");
remove_start_dot_slash(&mut p, '/');
assert_eq!(p, to_vector("/"));
}
#[test]
fn empty() {
let mut p = to_vector("");
remove_start_dot_slash(&mut p, '/');
assert_eq!(p, to_vector(""));
}
#[test]
fn dot_slash_only() {
let mut p = to_vector("./");
remove_start_dot_slash(&mut p, '/');
assert_eq!(p, to_vector(""));
}