Windows has the fc utility to compare files instead of diff

This commit is contained in:
Artem Dinaburg 2016-03-18 14:34:24 -04:00 committed by NeroBurner
parent 62c3e3cd56
commit b54793d232

View File

@ -489,7 +489,11 @@ static inline bool MungeAndDiffTestStderr(const string& golden_filename) {
WriteToFile(golden, munged_golden);
string munged_captured = cap->filename() + ".munged";
WriteToFile(captured, munged_captured);
#ifdef OS_WINDOWS
string diffcmd("fc " + munged_golden + " " + munged_captured);
#else
string diffcmd("diff -u " + munged_golden + " " + munged_captured);
#endif
if (system(diffcmd.c_str()) != 0) {
fprintf(stderr, "diff command was failed.\n");
}