Skip to content

Commit

Permalink
fix: handle windows line endings in instruction serialization tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WillLillis committed Feb 2, 2025
1 parent 8f439fb commit ae10ea4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions asm-lsp/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2726,6 +2726,18 @@ Width: 8 bits",
let instrs_raw = include_str!($raw_path);
let mut raw_vec = $populate_fn(instrs_raw).unwrap();

// HACK: Windows line endings...
if cfg!(target_os = "windows") {
for instr in &mut raw_vec {
instr.summary = instr.summary.replace('\r', "");
for form in &mut instr.forms {
if let Some(descr) = &form.avr_summary {
form.avr_summary = Some(descr.replace('\r', ""));
}
}
}
}

// HACK: To work around the difference in extra info urls between testing
// and production
for instr in &mut ser_vec {
Expand Down

0 comments on commit ae10ea4

Please sign in to comment.