From f78e308ca722ffc1644c0e3f441ec78021b42cfe Mon Sep 17 00:00:00 2001 From: Fabian Hamm Date: Wed, 9 Sep 2026 07:40:20 +0200 Subject: [PATCH] test: build the fallback message with format!, matching the commit before it `4057bee` claimed the report prints SYLPHEED_DISC PRESENT via the HARDCODED fallback, NOT $SYLPHEED_DISC and it did not. The string was built by `"...(not ${env})".replace("${env}", env)` -- a placeholder substituted at runtime, which printed `(not SYLPHEED_DISC)` and dropped the `$`. I had cleaned this up before committing, but the edit silently no-op'd (rustfmt had already rewrapped the line, so the pattern no longer matched) and the commit went ahead with the message quoting output the code does not produce. Now a plain `format!`, which is what it should have been: shorter, no placeholder to keep in sync, and the `$` makes it read as the env var it is. The quoted output in `4057bee` is accurate as of this commit. Not squashed into it because force-push is denied on this remote, and a visible correction is worth more than a rewritten history anyway. Verified: `cargo fmt --all -- --check` clean, both tests pass, output matches the text above exactly. Refs #16 Co-Authored-By: Claude Opus 5 --- crates/sylpheed-formats/tests/corpus_report.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sylpheed-formats/tests/corpus_report.rs b/crates/sylpheed-formats/tests/corpus_report.rs index 0e071da6..cc6221f6 100644 --- a/crates/sylpheed-formats/tests/corpus_report.rs +++ b/crates/sylpheed-formats/tests/corpus_report.rs @@ -58,7 +58,7 @@ fn resolve( // so the suites run because of this machine's directory layout — a // property invisible in the command and in the output. return ( - "PRESENT via the HARDCODED fallback (not ${env})".replace("${env}", env), + format!("PRESENT via the HARDCODED fallback, NOT ${env}"), Some(p), ); }