[glib: 5/16] tests: Fix TAP output from spawn-singlethread test




commit d48470df52d62c13d4b34beea8185725a0bb79fb
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jun 14 18:32:07 2022 +0100

    tests: Fix TAP output from spawn-singlethread test
    
    The output from the echo program ends up being outputted with the stdout
    from the unit test in some tests. Ensure that the input to the echo
    program is therefore a valid TAP comment, rather than garbage, so that
    it’s safely ignored by a TAP parser looking at the output from the test.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 glib/tests/spawn-singlethread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/tests/spawn-singlethread.c b/glib/tests/spawn-singlethread.c
index d0e3537ef8..fec9a69d10 100644
--- a/glib/tests/spawn-singlethread.c
+++ b/glib/tests/spawn-singlethread.c
@@ -201,7 +201,7 @@ test_spawn_async_with_fds (void)
     { NO_FD, PIPE, STDOUT_PIPE },  /* Test the same fd for stdout + stderr */
   };
 
-  arg = g_strdup_printf ("thread %d", tnum);
+  arg = g_strdup_printf ("# thread %d\n", tnum);
 
   argv = g_ptr_array_new ();
   g_ptr_array_add (argv, echo_prog_path);


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