mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 13:53:30 +02:00
add simple test for g_path_get_basename().
Tue Sep 18 18:19:33 2001 Tim Janik <timj@gtk.org> * tests/testglib.c: add simple test for g_path_get_basename(). * glib/gfileutils.c (g_file_open_tmp): * glib/gstrfuncs.c (g_strerror): scratch erroneous usages of "illegal".
This commit is contained in:
@@ -440,6 +440,15 @@ main (int argc,
|
||||
#endif /* G_HAVE_GINT64 */
|
||||
g_print ("\n");
|
||||
|
||||
g_print ("checking g_path_get_basename()...");
|
||||
string = g_path_get_basename ("/foo/dir/");
|
||||
g_assert (strcmp (string, "dir") == 0);
|
||||
g_free (string);
|
||||
string = g_path_get_basename ("/foo/file");
|
||||
g_assert (strcmp (string, "file") == 0);
|
||||
g_free (string);
|
||||
g_print ("ok\n");
|
||||
|
||||
g_print ("checking g_path_get_dirname()...");
|
||||
for (i = 0; i < n_dirname_checks; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user