From ed49b882bdebddae592bbcd137c5d4c455fb8be8 Mon Sep 17 00:00:00 2001 From: Darin Adler Date: Fri, 24 Aug 2001 20:50:56 +0000 Subject: [PATCH] Fix bad indenting. I figured I should fix this since I just pointed Alex * tests/shell-test.c: (check_string_result): Fix bad indenting. I figured I should fix this since I just pointed Alex here to look at this as an example. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ tests/shell-test.c | 46 ++++++++++++++++++++++++---------------------- 9 files changed, 72 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0d66a251..a3a156bac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a0d66a251..a3a156bac 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2001-08-24 Darin Adler + + * tests/shell-test.c: (check_string_result): Fix bad indenting. + I figured I should fix this since I just pointed Alex here to + look at this as an example. + 2001-08-24 Ron Steinke * glib/giochannel.c: Matthias Clasen's fix for diff --git a/tests/shell-test.c b/tests/shell-test.c index 47877339d..378c918c7 100644 --- a/tests/shell-test.c +++ b/tests/shell-test.c @@ -190,27 +190,27 @@ check_string_result (const char *expression, char *result, const char *expected) { - gboolean match; - - if (expected == NULL) - match = result == NULL; - else - match = result != NULL && strcmp (result, expected) == 0; - - if (!match) - { - if (!any_test_failed) - fprintf (stderr, "\n"); - - fprintf (stderr, "FAIL: check failed in %s, line %d\n", file_name, line_number); - fprintf (stderr, " evaluated: %s\n", expression); - fprintf (stderr, " expected: %s\n", expected == NULL ? "NULL" : expected); - fprintf (stderr, " got: %s\n", result == NULL ? "NULL" : result); - - any_test_failed = TRUE; - } - - g_free (result); + gboolean match; + + if (expected == NULL) + match = result == NULL; + else + match = result != NULL && strcmp (result, expected) == 0; + + if (!match) + { + if (!any_test_failed) + fprintf (stderr, "\n"); + + fprintf (stderr, "FAIL: check failed in %s, line %d\n", file_name, line_number); + fprintf (stderr, " evaluated: %s\n", expression); + fprintf (stderr, " expected: %s\n", expected == NULL ? "NULL" : expected); + fprintf (stderr, " got: %s\n", result == NULL ? "NULL" : result); + + any_test_failed = TRUE; + } + + g_free (result); } static char * @@ -224,7 +224,9 @@ test_shell_unquote (const char *str) if (error == NULL) return result; - /* Leaks the error, which is no big deal. */ + /* Leaks the error, which is no big deal and easy to fix if we + * decide it matters. + */ if (error->domain != G_SHELL_ERROR) return g_strdup ("error in domain other than G_SHELL_ERROR");