mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 06:02:36 +00:00
Fix the tests about the name format
This commit is contained in:
parent
53ad81f006
commit
75f413ae8a
2 changed files with 12 additions and 12 deletions
|
@ -344,14 +344,14 @@ mod tests {
|
|||
fn test_display_get_visible_width_with_icons() {
|
||||
for (s, l) in &[
|
||||
// Add 3 characters for the icons.
|
||||
("Hello,world!", 25),
|
||||
("ASCII1234-_", 14),
|
||||
("File with space", 18),
|
||||
("制作样本。", 13),
|
||||
("日本語", 9),
|
||||
("샘플은 무료로 드리겠습니다", 29),
|
||||
("👩🐩", 7),
|
||||
("🔬", 5),
|
||||
("Hello,world!", 24),
|
||||
("ASCII1234-_", 13),
|
||||
("File with space", 17),
|
||||
("制作样本。", 12),
|
||||
("日本語", 8),
|
||||
("샘플은 무료로 드리겠습니다", 28),
|
||||
("👩🐩", 6),
|
||||
("🔬", 4),
|
||||
] {
|
||||
let path = Path::new(s);
|
||||
let name = Name::new(
|
||||
|
|
|
@ -130,7 +130,7 @@ mod test {
|
|||
let name = Name::new(&file_path, file_type);
|
||||
|
||||
assert_eq!(
|
||||
Colour::Fixed(184).paint(" file.txt"),
|
||||
Colour::Fixed(184).paint(" file.txt"),
|
||||
name.render(&colors, &icons)
|
||||
);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ mod test {
|
|||
let colors = Colors::new(color::Theme::NoLscolors);
|
||||
|
||||
assert_eq!(
|
||||
Colour::Fixed(33).paint(" directory"),
|
||||
Colour::Fixed(33).paint(" directory"),
|
||||
meta.name.render(&colors, &icons)
|
||||
);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ mod test {
|
|||
let name = Name::new(&symlink_path, file_type);
|
||||
|
||||
assert_eq!(
|
||||
Colour::Fixed(44).paint(" target.tmp"),
|
||||
Colour::Fixed(44).paint(" target.tmp"),
|
||||
name.render(&colors, &icons)
|
||||
);
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ mod test {
|
|||
let name = Name::new(&pipe_path, file_type);
|
||||
|
||||
assert_eq!(
|
||||
Colour::Fixed(184).paint(" pipe.tmp"),
|
||||
Colour::Fixed(184).paint(" pipe.tmp"),
|
||||
name.render(&colors, &icons)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue