Fix the tests about the name format

This commit is contained in:
Pierre Peltier 2019-11-04 17:10:09 +01:00 committed by Abin Simon
parent 53ad81f006
commit 75f413ae8a
2 changed files with 12 additions and 12 deletions

View file

@ -344,14 +344,14 @@ mod tests {
fn test_display_get_visible_width_with_icons() {
for (s, l) in &[
// Add 3 characters for the icons.
(",!", 25),
("ASCII1234-_", 14),
("File with space", 18),
("制作样本。", 13),
("日本語", 9),
("샘플은 무료로 드리겠습니다", 29),
("👩🐩", 7),
("🔬", 5),
(",!", 24),
("ASCII1234-_", 13),
("File with space", 17),
("制作样本。", 12),
("日本語", 8),
("샘플은 무료로 드리겠습니다", 28),
("👩🐩", 6),
("🔬", 4),
] {
let path = Path::new(s);
let name = Name::new(

View file

@ -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)
);
}