Skip to content

Commit

Permalink
chore(test): only remove \r line endings on Windows platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
WillLillis committed Dec 26, 2024
1 parent 0ccbc20 commit 53cab96
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions asm-lsp/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2419,9 +2419,11 @@ Width: 8 bits",
let mut raw_vec = populate_registers(regs_raw).unwrap();

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

Expand Down Expand Up @@ -2644,8 +2646,10 @@ Width: 8 bits",
let mut raw_vec = $populate_fn(dirs_raw).unwrap();

// HACK: Windows line endings...
for dir in &mut raw_vec {
dir.description = dir.description.replace('\r', "");
if cfg!(target_os = "windows") {
for dir in &mut raw_vec {
dir.description = dir.description.replace('\r', "");
}
}

for dir in ser_vec {
Expand Down

0 comments on commit 53cab96

Please sign in to comment.