[glib: 1/4] tests/spawn-singlethread: fix test EOL on win32




commit a43723ef17166447800468335f326af366fcf275
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Jun 24 14:07:41 2022 +0400

    tests/spawn-singlethread: fix test EOL on win32
    
    The "arg" argument is given in \n-ending form, but the returned result
    is \r\n-ending.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 glib/tests/spawn-singlethread.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/glib/tests/spawn-singlethread.c b/glib/tests/spawn-singlethread.c
index e4f15ecab8..3ece69dc93 100644
--- a/glib/tests/spawn-singlethread.c
+++ b/glib/tests/spawn-singlethread.c
@@ -295,10 +295,12 @@ test_spawn_async_with_fds (void)
 
       if (test_pipe[1][0] >= 0)
         {
+          gchar *tmp = g_strdup_printf ("# thread %d" LINEEND, tnum);
           /* Check for echo on stdout */
           g_assert_true (data.stdout_done);
-          g_assert_cmpstr (data.stdout_buf->str, ==, arg);
+          g_assert_cmpstr (data.stdout_buf->str, ==, tmp);
           g_io_channel_unref (channel);
+          g_free (tmp);
         }
       g_string_free (data.stdout_buf, TRUE);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]