From 8c9bbbb00aa2928351e262ed0b0341d42ad81059 Mon Sep 17 00:00:00 2001 From: fdai7381 Date: Mon, 30 Jan 2023 20:17:08 +0100 Subject: [PATCH] test: add format filesize bytes test --- src/builtins/ls.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/builtins/ls.rs b/src/builtins/ls.rs index 48456ae..63beb84 100644 --- a/src/builtins/ls.rs +++ b/src/builtins/ls.rs @@ -103,3 +103,13 @@ fn right_padding(s: &str, max: usize) -> String { } tmp } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_format_filesize_bytes() { + assert_eq!(format_filesize(6969), "6969B"); + } +}