Skip to content

Commit 9b4e9b4

Browse files
committed
test: add unit test for list-details format
1 parent 7bbbdbd commit 9b4e9b4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/tests.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,6 +2525,18 @@ fn test_list_details() {
25252525
te.assert_success_and_get_output(".", &["--list-details"]);
25262526
}
25272527

2528+
#[test]
2529+
fn test_list_details_format() {
2530+
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
2531+
create_file_with_size(te.test_root().join("size_test_100"), 100);
2532+
2533+
let output = te.assert_success_and_get_output(".", &["--list-details", "size_test_100"]);
2534+
let stdout = String::from_utf8_lossy(&output.stdout);
2535+
2536+
assert!(stdout.contains("100 B"));
2537+
assert!(stdout.trim().ends_with("size_test_100"));
2538+
}
2539+
25282540
#[test]
25292541
fn test_single_and_multithreaded_execution() {
25302542
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);

0 commit comments

Comments
 (0)