diff options
author | Darin Adler <darin@src.gnome.org> | 2001-08-24 20:50:56 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2001-08-24 20:50:56 +0000 |
commit | ed49b882bdebddae592bbcd137c5d4c455fb8be8 (patch) | |
tree | cf42c9a7de5aee81e555a38bdcd06289529f7cb3 /tests/shell-test.c | |
parent | 7a90af4d33efb6bf9c7840e631861d2989c1555b (diff) | |
download | glib-ed49b882bdebddae592bbcd137c5d4c455fb8be8.tar.gz glib-ed49b882bdebddae592bbcd137c5d4c455fb8be8.tar.bz2 glib-ed49b882bdebddae592bbcd137c5d4c455fb8be8.zip |
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.
Diffstat (limited to 'tests/shell-test.c')
-rw-r--r-- | tests/shell-test.c | 46 |
1 files changed, 24 insertions, 22 deletions
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"); |