cmd/tests: Fix bug where an output line was marked as matching when the expected line only differs by a terminal @space@.

This commit is contained in:
Frédéric Delanoy 2011-08-20 01:58:56 +02:00 committed by Alexandre Julliard
parent 0758390607
commit bc8fde1c00
1 changed files with 6 additions and 2 deletions

View File

@ -168,9 +168,13 @@ static const char *compare_line(const char *out_line, const char *out_end, const
}else if(exp_ptr+sizeof(space_cmd) <= exp_end }else if(exp_ptr+sizeof(space_cmd) <= exp_end
&& !memcmp(exp_ptr, space_cmd, sizeof(space_cmd))) { && !memcmp(exp_ptr, space_cmd, sizeof(space_cmd))) {
exp_ptr += sizeof(space_cmd); exp_ptr += sizeof(space_cmd);
if(out_ptr < out_end && *out_ptr == ' ') if(out_ptr < out_end && *out_ptr == ' ') {
out_ptr++; out_ptr++;
continue; continue;
} else {
err = out_end;
}
}else if(exp_ptr+sizeof(or_broken_cmd) <= exp_end }else if(exp_ptr+sizeof(or_broken_cmd) <= exp_end
&& !memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) { && !memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) {
if(out_ptr == out_end) if(out_ptr == out_end)