Frédéric Delanoy : cmd/tests: Fix bug where an output line was marked as matching when the expected line only differs by a terminal @space at .
Alexandre Julliard
julliard at winehq.org
Tue Aug 23 12:44:57 CDT 2011
Module: wine
Branch: master
Commit: bc8fde1c0003b7e753dd60bf4909ddc7d6efa4be
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc8fde1c0003b7e753dd60bf4909ddc7d6efa4be
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Sat Aug 20 01:58:56 2011 +0200
cmd/tests: Fix bug where an output line was marked as matching when the expected line only differs by a terminal @space at .
---
programs/cmd/tests/batch.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c
index 3f8826f..17649d4 100644
--- a/programs/cmd/tests/batch.c
+++ b/programs/cmd/tests/batch.c
@@ -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
&& !memcmp(exp_ptr, space_cmd, sizeof(space_cmd))) {
exp_ptr += sizeof(space_cmd);
- if(out_ptr < out_end && *out_ptr == ' ')
+ if(out_ptr < out_end && *out_ptr == ' ') {
out_ptr++;
- continue;
+ continue;
+ } else {
+ err = out_end;
+ }
+
}else if(exp_ptr+sizeof(or_broken_cmd) <= exp_end
&& !memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) {
if(out_ptr == out_end)
More information about the wine-cvs
mailing list