mirror of
https://github.com/starship/starship.git
synced 2024-12-26 17:18:49 +01: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]
|
#[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();
|
||||||
|
Loading…
Reference in New Issue
Block a user