[F] Fix logging

This commit is contained in:
2026-05-10 10:45:33 +00:00
parent 2295ebfca6
commit 0b9516d252
3 changed files with 27 additions and 198 deletions
+1 -13
View File
@@ -1,20 +1,8 @@
use super::*;
#[test]
fn repo_prefix_pads_and_truncates_to_fixed_width() {
assert_eq!(repo_prefix("api", 6), "api ");
assert_eq!(repo_prefix("very-long-repo", 8), "very-lo~");
}
#[test]
fn status_text_truncates_to_fixed_width() {
assert_eq!(truncate_status("short", 8), "short");
assert_eq!(truncate_status("very-long-status", 8), "very-lo~");
}
#[test]
fn repo_log_context_is_inherited_by_parallel_workers() {
let _guard = start_repo_log("repo-a".to_string(), 0, 8);
let _guard = start_repo_log();
crate::logln!("outer line");
crate::parallel::map(vec!["worker line"], 1, |line| {