mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-29 04:23:26 +00:00
test(directory): fix on windows without admin (#2497)
This commit is contained in:
parent
d06ba072a8
commit
9d15eb135b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user