설정 A: JSON 약속 시험이 줄 끝 (CRLF) 을 맞춰 견줌 - 다른 worktree 에서 꺼낸 시험 자료도

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
modular
RyuJongJin 2026-10-22 20:12:07 +09:00
parent 74da2e9a3e
commit db45f80e9a
1 changed files with 5 additions and 3 deletions

View File

@ -48,8 +48,10 @@ void main() {
defFile.writeAsStringSync(canonical(AppSettings().toJson()));
return;
}
expect(roundTrip(inFile.readAsStringSync()), outFile.readAsStringSync());
expect(canonical(AppSettings().toJson()), defFile.readAsStringSync());
// git 이 줄 끝을 CRLF 로 바꿔 꺼낼 수 있다 - LF 로 맞춰 견줌
String read(File f) => f.readAsStringSync().replaceAll('\r\n', '\n');
expect(roundTrip(read(inFile)), read(outFile));
expect(canonical(AppSettings().toJson()), read(defFile));
});
final expectPath = Platform.environment['JJ_USER_SETTINGS_EXPECT'];
@ -63,6 +65,6 @@ void main() {
File(expectPath!).writeAsStringSync(got);
return;
}
expect(got, File(expectPath!).readAsStringSync());
expect(got, File(expectPath!).readAsStringSync().replaceAll('\r\n', '\n'));
}, skip: expectPath == null ? '사용자 파일 기준 (JJ_USER_SETTINGS_EXPECT) 이 없으면 건너뜀 - 이 PC 에서만' : null);
}