1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 15:56:28 +00:00

test(directory): fix on windows without admin (#2497)

This commit is contained in:
David Knaack 2021-03-31 18:00:24 +02:00 committed by GitHub
parent d06ba072a8
commit 9d15eb135b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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