mirror of
https://github.com/danog/ir.git
synced 2024-11-30 04:39:43 +01:00
Merge pull request #26 from stkeke/show_diff_win
[ir-test]: Fix #25: use 'fc.exe' for diff on Windows
This commit is contained in:
commit
20d3a4fac1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user