From 71075ee0db9c46f6081c5683e15cdcd84cd6d23d Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 18 Sep 2001 16:33:20 +0000 Subject: [PATCH] add simple test for g_path_get_basename(). Tue Sep 18 18:19:33 2001 Tim Janik * 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". --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-12 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ docs/reference/glib/tmpl/iochannels.sgml | 2 ++ glib/gfileutils.c | 2 +- glib/gstrfuncs.c | 2 +- tests/testglib.c | 9 +++++++++ 12 files changed, 77 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8043047..0333c60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8043047..0333c60 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Tue Sep 18 18:19:33 2001 Tim Janik + + * 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". + 2001-09-18 Tor Lillqvist * glib/gmain.c diff --git a/docs/reference/glib/tmpl/iochannels.sgml b/docs/reference/glib/tmpl/iochannels.sgml index 4a6c864..604262b 100644 --- a/docs/reference/glib/tmpl/iochannels.sgml +++ b/docs/reference/glib/tmpl/iochannels.sgml @@ -533,6 +533,7 @@ generic way. @channel: +@length: @Returns: @@ -543,6 +544,7 @@ generic way. @channel: @line_term: +@length: diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 859961b..3ab354c 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -652,7 +652,7 @@ g_file_open_tmp (const char *tmpl, g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, - _("Template '%s' illegal, should not contain a '%s'"), + _("Template '%s' invalid, should not contain a '%s'"), tmpl, G_DIR_SEPARATOR_S); return -1; diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 52f67ce..c7863e2 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -435,7 +435,7 @@ g_strerror (gint errnum) case EISCONN: return "socket is already connected"; #endif #ifdef EISDIR - case EISDIR: return "illegal operation on a directory"; + case EISDIR: return "is a directory"; #endif #ifdef EISNAME case EISNAM: return "is a name file"; diff --git a/tests/testglib.c b/tests/testglib.c index c914e8a..82f8d67 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -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++) { -- 2.7.4