mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
uudoc: move tldr.zip warning to build.rs (#10039)
Move the tldr.zip missing warning from runtime (uudoc.rs) to compile time (build.rs). This ensures the warning is printed only once during the build, instead of 100+ times when make calls uudoc separately for each utility. Fixes #9940
This commit is contained in:
+12
-6
@@ -28,9 +28,11 @@ fn test_manpage_generation() {
|
||||
"Command failed with status: {}",
|
||||
output.status
|
||||
);
|
||||
// Note: tldr warning is now printed at build time (in build.rs), not at runtime
|
||||
assert!(
|
||||
String::from_utf8_lossy(&output.stderr).contains("Warning: No tldr archive found"),
|
||||
"stderr should contains tldr alert",
|
||||
output.stderr.is_empty(),
|
||||
"stderr should be empty but got: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
|
||||
let output_str = String::from_utf8_lossy(&output.stdout);
|
||||
@@ -52,9 +54,11 @@ fn test_manpage_coreutils() {
|
||||
"Command failed with status: {}",
|
||||
output.status
|
||||
);
|
||||
// Note: tldr warning is now printed at build time (in build.rs), not at runtime
|
||||
assert!(
|
||||
String::from_utf8_lossy(&output.stderr).contains("Warning: No tldr archive found"),
|
||||
"stderr should contains tldr alert",
|
||||
output.stderr.is_empty(),
|
||||
"stderr should be empty but got: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
|
||||
let output_str = String::from_utf8_lossy(&output.stdout);
|
||||
@@ -123,9 +127,11 @@ fn test_manpage_base64() {
|
||||
"Command failed with status: {}",
|
||||
output.status
|
||||
);
|
||||
// Note: tldr warning is now printed at build time (in build.rs), not at runtime
|
||||
assert!(
|
||||
String::from_utf8_lossy(&output.stderr).contains("Warning: No tldr archive found"),
|
||||
"stderr should contains tldr alert",
|
||||
output.stderr.is_empty(),
|
||||
"stderr should be empty but got: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
|
||||
let output_str = String::from_utf8_lossy(&output.stdout);
|
||||
|
||||
Reference in New Issue
Block a user