mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Improve charset test coverage
This commit is contained in:
parent
4f0a13effc
commit
90aa4ed0a0
@ -319,6 +319,21 @@ test_codeset (void)
|
||||
g_free (c);
|
||||
}
|
||||
|
||||
static void
|
||||
test_codeset2 (void)
|
||||
{
|
||||
if (g_test_subprocess ())
|
||||
{
|
||||
const gchar *c;
|
||||
g_setenv ("CHARSET", "UTF-8", TRUE);
|
||||
g_get_charset (&c);
|
||||
g_assert_cmpstr (c, ==, "UTF-8");
|
||||
return;
|
||||
}
|
||||
g_test_trap_subprocess (NULL, 0, 0);
|
||||
g_test_trap_assert_passed ();
|
||||
}
|
||||
|
||||
static void
|
||||
test_basename (void)
|
||||
{
|
||||
@ -555,6 +570,7 @@ main (int argc,
|
||||
g_test_add_func ("/utils/find-program", test_find_program);
|
||||
g_test_add_func ("/utils/debug", test_debug);
|
||||
g_test_add_func ("/utils/codeset", test_codeset);
|
||||
g_test_add_func ("/utils/codeset2", test_codeset2);
|
||||
g_test_add_func ("/utils/basename", test_basename);
|
||||
g_test_add_func ("/utils/gettext", test_gettext);
|
||||
g_test_add_func ("/utils/username", test_username);
|
||||
|
Loading…
Reference in New Issue
Block a user