1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 07:46: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]
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();