p7zip: update to 17.06
[oi-userland.git] / components / library / glib / patches / 21-test-one-half-convert.patch
blob30b860393be31d613f2459dfc7c57922063cc942
1 --- glib-2.82.0/glib/tests/convert.c.orig
2 +++ glib-2.82.0/glib/tests/convert.c
3 @@ -84,9 +84,14 @@
4 &bytes_read, &bytes_written,
5 &error);
7 + /* Characters that do not exist in target codeset are converted to
8 + * implementation-defined character by underlying iconv(). On illumos it is
9 + * '?'. This is detected by g_convert() so error is set and NULL is
10 + * returned, but both bytes_read and bytes_written are left updated. More
11 + * details: https://gitlab.gnome.org/GNOME/glib/-/issues/1303 */
12 g_assert_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE);
13 - g_assert_cmpint (bytes_read, ==, 0);
14 - g_assert_cmpint (bytes_written, ==, 0);
15 + g_assert_cmpint (bytes_read, ==, 2);
16 + g_assert_cmpint (bytes_written, ==, 1);
17 g_assert_cmpstr (out, ==, NULL);
18 g_clear_error (&error);
19 g_free (out);
20 @@ -97,10 +102,12 @@
21 &bytes_read, &bytes_written,
22 &error);
24 + /* This is similar case as above so the "vulgar fraction one half" got
25 + * converted to '?' and the fallback was not used. */
26 g_assert_no_error (error);
27 g_assert_cmpint (bytes_read, ==, 2);
28 g_assert_cmpint (bytes_written, ==, 1);
29 - g_assert_cmpstr (out, ==, "a");
30 + g_assert_cmpstr (out, ==, "?");
31 g_free (out);