fix(bfld): make README quickstart test robust to CRLF line endings

readme_quickstart_uses_canonical_public_api checked a multi-line needle
'pipeline\n    .process' against the include_str! README. On a CRLF
checkout (Windows / core.autocrlf) the content is 'pipeline\r\n    .process',
so the LF needle never matched and the test failed deterministically (only
surfaced once the worldmodel fix let cargo test --workspace run on Windows;
the test is #[cfg(feature=std)]-gated, enabled via workspace feature
unification). Normalize CRLF->LF before the check. Full workspace now green
3/3 runs on Windows.

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
ruv 2026-05-31 04:27:25 -04:00
parent c9539433b8
commit 1b48b6f5c8
1 changed files with 5 additions and 1 deletions

View File

@ -50,6 +50,10 @@ fn readme_references_companion_adrs_118_through_123() {
fn readme_quickstart_uses_canonical_public_api() {
// The quickstart snippets must reference the actual operator-facing
// surface — drift here would mislead first-time users.
// Normalize line endings so the multi-line needle below is robust to a
// CRLF checkout (Windows / `core.autocrlf=true`); the README renders
// identically either way on crates.io.
let readme = README.replace("\r\n", "\n");
for needle in [
"BfldPipeline::new",
"BfldConfig::new",
@ -62,7 +66,7 @@ fn readme_quickstart_uses_canonical_public_api() {
"BfldPipelineHandle::spawn",
"PipelineInput",
] {
assert!(README.contains(needle), "quickstart missing canonical API: {needle}");
assert!(readme.contains(needle), "quickstart missing canonical API: {needle}");
}
}