Update doctest case for drive that now set PWD

This commit is contained in:
pegasus.cadence@gmail.com 2024-11-23 20:28:01 -08:00
parent b99578a2b4
commit e253ad54b5

View File

@ -8,9 +8,9 @@ pub enum PathError {
} }
/// Usage for pwd_per_drive on windows /// Usage for pwd_per_drive on windows
/// ///
/// Upon change PWD, call set_pwd_per_drive() with absolute path /// Upon change PWD, call set_pwd() with absolute path
/// ///
/// Call expand_pwd_per_drive() with relative path to get absolution path /// Call expand_pwd() with relative path to get absolution path
/// ///
/// ``` /// ```
/// use std::path::{Path, PathBuf}; /// use std::path::{Path, PathBuf};
@ -33,7 +33,10 @@ pub enum PathError {
/// ///
/// // Expand with no PWD set for the drive /// // Expand with no PWD set for the drive
/// let expanded = expand_pwd(Path::new("D:test")); /// let expanded = expand_pwd(Path::new("D:test"));
/// assert_eq!(expanded, Some(PathBuf::from(r"D:\test"))); /// assert!(expanded.is_some());
/// let abs_path = expanded.unwrap().as_path().to_str().expect("OK").to_string();
/// assert!(abs_path.starts_with(r"D:\"));
/// assert!(abs_path.ends_with(r"\test"));
/// ``` /// ```
pub mod singleton { pub mod singleton {
use super::*; use super::*;