From 5661e9cdcab065bec30b6dd9ae0805a94daf657e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Thu, 4 Aug 2011 11:50:44 +0200 Subject: [PATCH] cmd/tests: Ensure failures are caught in all cases when an expected line ends with a '@'. --- programs/cmd/tests/batch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c index c4ccaab7d23..67ecd3d7e95 100644 --- a/programs/cmd/tests/batch.c +++ b/programs/cmd/tests/batch.c @@ -186,7 +186,8 @@ static const char *compare_line(const char *out_line, const char *out_end, const && !memcmp(exp_ptr, or_broken_cmd, sizeof(or_broken_cmd))) { exp_ptr = exp_end; continue; - } + }else if(out_ptr == out_end || *out_ptr != *exp_ptr) + err = out_ptr; }else if(out_ptr == out_end || *out_ptr != *exp_ptr) { err = out_ptr; }