diff options
author | Pierre Peltier <pierre.peltier@adevinta.com> | 2019-11-04 17:10:09 +0100 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2019-12-06 11:35:03 +0530 |
commit | 75f413ae8a19373299c59dff35ae00ca5b0760f1 (patch) | |
tree | 4bbdb389fd1025d76e0f4299c15087cee9ede688 | |
parent | 53ad81f0062dea76a34ee283db1748ba597ee912 (diff) |
Fix the tests about the name format
-rw-r--r-- | src/display.rs | 16 | ||||
-rw-r--r-- | src/meta/name.rs | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/display.rs b/src/display.rs index 5499ee0..25bee0e 100644 --- a/src/display.rs +++ b/src/display.rs @@ -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( diff --git a/src/meta/name.rs b/src/meta/name.rs index 36db470..f734e6b 100644 --- a/src/meta/name.rs +++ b/src/meta/name.rs @@ -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) ); } |