Skip to content

Commit fadba7a

Browse files
committed
修复跨平台换行符逻辑,确保在 Windows 和非 Windows 系统中正确处理快照的连接方式。
1 parent 4f37eea commit fadba7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/test_utils/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ is: {}
339339

340340
// self.snapshots.insert(0, envs);
341341

342+
#[cfg(windows)]
343+
let res = self.snapshots.join("\r\n");
344+
#[cfg(not(windows))]
342345
let res = self.snapshots.join("\n");
343346

344347
let current_dir = current_dir().unwrap();

0 commit comments

Comments
 (0)