Frédéric Delanoy : cmd/tests: Fix "broken" handling when expected line is empty.
Alexandre Julliard
julliard at winehq.org
Wed Aug 3 12:48:14 CDT 2011
Module: wine
Branch: master
Commit: bde872e7826b4e70e6bc5b2f73653641ef27cf99
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bde872e7826b4e70e6bc5b2f73653641ef27cf99
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Tue Aug 2 22:55:37 2011 +0200
cmd/tests: Fix "broken" handling when expected line is empty.
---
programs/cmd/tests/batch.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c
index 84d7f39..c4ccaab 100644
--- a/programs/cmd/tests/batch.c
+++ b/programs/cmd/tests/batch.c
@@ -152,6 +152,16 @@ static const char *compare_line(const char *out_line, const char *out_end, const
static const char space_cmd[] = {'@','s','p','a','c','e','@'};
static const char or_broken_cmd[] = {'@','o','r','_','b','r','o','k','e','n','@'};
+ /* Corner case where exp_line directly starts with @or_broken@, on Windowses */
+ if(broken(1)
+ && exp_line+sizeof(or_broken_cmd) <= exp_end
+ && !memcmp(exp_line, or_broken_cmd, sizeof(or_broken_cmd))) {
+ if(out_line == out_end)
+ return NULL;
+ else
+ exp_ptr = exp_line + sizeof(or_broken_cmd);
+ }
+
while(exp_ptr < exp_end) {
if(*exp_ptr == '@') {
if(exp_ptr+sizeof(pwd_cmd) <= exp_end
More information about the wine-cvs
mailing list