diff --git a/src/modules/directory.rs b/src/modules/directory.rs index 9b154a824..35e1d6c26 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -683,14 +683,14 @@ mod tests { #[test] fn root_directory() { - let actual = ModuleRenderer::new("directory").path("/").collect(); - #[cfg(not(target_os = "windows"))] - let expected = Some(format!( - "{}{} ", - Color::Cyan.bold().paint("/"), - Color::Red.normal().paint("🔒") - )); - #[cfg(target_os = "windows")] + let actual = ModuleRenderer::new("directory") + .config(toml::toml! { + [directory] + read_only = "" + read_only_style = "" + }) + .path("/") + .collect(); let expected = Some(format!("{} ", Color::Cyan.bold().paint("/"))); assert_eq!(expected, actual); @@ -1466,6 +1466,8 @@ mod tests { [directory] use_logical_path = false truncation_length = 0 + read_only = "" + read_only_style = "" }) .path(sys32_path) .collect();