diff --git a/ir-test.cxx b/ir-test.cxx index 4555ef2..74390d7 100644 --- a/ir-test.cxx +++ b/ir-test.cxx @@ -24,13 +24,15 @@ # define PATH_SEP "\\" # define EXE_SUF ".exe" # define REGEX_FLAGS std::regex::extended -# define DIFF_ARGS "--strip-trailing-cr" +# define DIFF_CMD "fc.exe" +# define DIFF_ARGS "/n" # define IR_ARGS "--no-abort-fault" #else # define PATH_SEP "/" # define EXE_SUF "" # define REGEX_FLAGS std::regex::ECMAScript | std::regex::multiline -# define DIFF_ARGS "" +# define DIFF_CMD "diff" +# define DIFF_ARGS "--strip-trailing-cr -u" # define IR_ARGS "" #endif @@ -182,7 +184,7 @@ namespace ir { in_os.close(); auto test_cmd = ::ir_exe + " " + ir_file + " " + args + " " + IR_ARGS + " >" + out_file + " 2>&1"; - auto diff_cmd = std::string("diff") + " " + DIFF_ARGS + " -u " + exp_file + " " + out_file + " > " + diff_file + " 2>&1"; + auto diff_cmd = std::string(DIFF_CMD) + " " + DIFF_ARGS + " " + exp_file + " " + out_file + " > " + diff_file + " 2>&1"; int ret_code = std::system(test_cmd.c_str()) >> 0x8;