mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 04:56:14 +01:00
tests: Add additional assertions to gsubprocess test
This should quell a scan-build warning about passing `NULL` to `strlen()`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
c1a4aca743
commit
0781e12f45
@ -757,11 +757,15 @@ on_communicate_complete (GObject *proc,
|
||||
{
|
||||
if (data->is_utf8)
|
||||
{
|
||||
g_assert_nonnull (stdout_str);
|
||||
stdout_data = (guint8*)stdout_str;
|
||||
stdout_len = strlen (stdout_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_assert_nonnull (stdout_bytes);
|
||||
stdout_data = g_bytes_get_data (stdout_bytes, &stdout_len);
|
||||
}
|
||||
|
||||
g_assert_cmpmem (stdout_data, stdout_len, "# hello world" LINEEND, 13 + strlen (LINEEND));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user