[svn-r16351] merge 16348
#1368 (E1) h5diff: implement "not comparable" messages. Implemented RFC. The new option is <-c, --compare List objects that are not comparable> added some test cases tested: windows, linux
This commit is contained in:
@@ -31,7 +31,7 @@ const char *progname = "h5diff";
|
||||
* Command-line options: The user can specify short or long-named
|
||||
* parameters.
|
||||
*/
|
||||
static const char *s_opts = "hVrvqn:d:p:N";
|
||||
static const char *s_opts = "hVrvqn:d:p:Nc";
|
||||
static struct long_options l_opts[] = {
|
||||
{ "help", no_arg, 'h' },
|
||||
{ "version", no_arg, 'V' },
|
||||
@@ -42,6 +42,7 @@ static struct long_options l_opts[] = {
|
||||
{ "delta", require_arg, 'd' },
|
||||
{ "relative", require_arg, 'p' },
|
||||
{ "nan", no_arg, 'N' },
|
||||
{ "compare", no_arg, 'c' },
|
||||
{ NULL, 0, '\0' }
|
||||
};
|
||||
|
||||
@@ -138,6 +139,9 @@ void parse_command_line(int argc,
|
||||
case 'N':
|
||||
options->do_nans = 0;
|
||||
break;
|
||||
case 'c':
|
||||
options->m_list_not_cmp = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,11 +198,15 @@ void parse_command_line(int argc,
|
||||
|
||||
if (options->not_cmp==1)
|
||||
{
|
||||
printf("--------------------------------\n");
|
||||
printf("Some objects are not comparable\n");
|
||||
printf("--------------------------------\n");
|
||||
if (!options->m_verbose)
|
||||
printf("Use -v for a list of objects.\n");
|
||||
if ( options->m_list_not_cmp == 0 )
|
||||
{
|
||||
printf("--------------------------------\n");
|
||||
printf("Some objects are not comparable\n");
|
||||
printf("--------------------------------\n");
|
||||
printf("Use -c for a list of objects.\n");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -331,6 +339,7 @@ void usage(void)
|
||||
printf(" -r, --report Report mode. Print differences\n");
|
||||
printf(" -v, --verbose Verbose mode. Print differences, list of objects\n");
|
||||
printf(" -q, --quiet Quiet mode. Do not do output\n");
|
||||
printf(" -c, --compare List objects that are not comparable\n");
|
||||
printf(" -N, --nan Avoid NaNs detection\n");
|
||||
|
||||
printf(" -n C, --count=C Print differences up to C number\n");
|
||||
|
||||
Reference in New Issue
Block a user