mirror of
https://github.com/lsd-rs/lsd.git
synced 2026-02-13 18:53:17 +02:00
Fix the tests about the name format
This commit is contained in:
committed by
Abin Simon
parent
53ad81f006
commit
75f413ae8a
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user