normalizefs 0.0.11

Normalization of file system paths
Documentation
use super::pathconv::path_to_vector as to_vector;
use super::have_drive;


//   checks if Windows path contains drive letter

#[test]
fn no_drive() {
   let p = &to_vector("nothing/here");
   assert_eq!(have_drive(p), false);
}

#[test]
fn too_short() {
   let p = &to_vector("/");
   assert_eq!(have_drive(p), false);
}

#[test]
fn empty() {
   let p = &to_vector("");
   assert_eq!(have_drive(p), false);
}

#[test]
fn small() {
   let p = &to_vector(r"c:\small");
   assert_eq!(have_drive(p), true);
}

#[test]
fn caps() {
   let p = &to_vector(r"C:\CAPS");
   assert_eq!(have_drive(p), true);
}

#[test]
fn question_mark() {
   let p = &to_vector(r"?:\CAPS");
   assert_eq!(have_drive(p), false);
}