[PATCH] cmd/tests: If we rewind to the beginning of the line, don't increment line number.

Christian Costa titan.costa at gmail.com
Mon Mar 26 03:13:44 CDT 2012


If some particular cases, a bias is introduced in the line number which make error message
mismatch the content of the .exp file. This patch fixes that.
---
 programs/cmd/tests/batch.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c
index 8236352..6cf740b 100644
--- a/programs/cmd/tests/batch.c
+++ b/programs/cmd/tests/batch.c
@@ -315,7 +315,11 @@ static void test_output(const char *out_data, DWORD out_size, const char *exp_da
         if(is_todo_wine) winetest_end_todo("wine");
 
         if (is_exp_resync && err && is_todo_wine)
+        {
             exp_ptr -= sizeof(todo_wine_cmd);
+            /* If we rewind to the beginning of the line, don't increment line number */
+            line--;
+        }
         else if (!is_exp_resync || (is_exp_resync && !err))
         {
             exp_ptr = exp_nl+1;




More information about the wine-patches mailing list