Merge pull request #1521 from ludovic111/fix/launcher-doc-crlf
🤖 Agent: merged after verify and CI parity passed, built merged with current main (launcher-ship-1). #1521: generated docs keep LF line endings on Windows, so the launcher builds there again (dry run 40035909909 green on all three OSes). #1522: Prepare no longer requires Netty's optional native transport jar, which Prism never downloads (fixes #1487; test plus a real Prism-layout prepare).
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Generated files that tests compare byte for byte with what they generate: LF on every OS, also
|
||||
# where Git for Windows' core.autocrlf would check them out with CRLF.
|
||||
docs/launcher-commands.md text eol=lf
|
||||
docs/horizon-ctl-commands.md text eol=lf
|
||||
website/src/tokens.css text eol=lf
|
||||
@@ -419,6 +419,20 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
/// Whether the reference on disk says `want`, whatever line endings the checkout gave it: Git
|
||||
/// for Windows checks text out with CRLF (core.autocrlf) where .gitattributes does not pin LF.
|
||||
fn up_to_date(have: &str, want: &str) -> bool {
|
||||
have.replace("\r\n", "\n") == want
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_windows_checkout_of_the_reference_is_up_to_date() {
|
||||
let want = markdown();
|
||||
assert!(up_to_date(&want, &want));
|
||||
assert!(up_to_date(&want.replace('\n', "\r\n"), &want));
|
||||
assert!(!up_to_date(&want.replacen("## ", "### ", 1), &want));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_launcher_reference_is_up_to_date() {
|
||||
let path =
|
||||
@@ -429,7 +443,7 @@ mod tests {
|
||||
}
|
||||
let have = std::fs::read_to_string(&path).unwrap_or_default();
|
||||
assert!(
|
||||
have == want,
|
||||
up_to_date(&have, &want),
|
||||
"docs/launcher-commands.md is out of date: HORIZON_WRITE_DOCS=1 cargo test --manifest-path launcher/Cargo.toml the_launcher_reference"
|
||||
);
|
||||
for tool in all() {
|
||||
|
||||
Reference in New Issue
Block a user