Fix bad indenting. I figured I should fix this since I just pointed Alex
authorDarin Adler <darin@src.gnome.org>
Fri, 24 Aug 2001 20:50:56 +0000 (20:50 +0000)
committerDarin Adler <darin@src.gnome.org>
Fri, 24 Aug 2001 20:50:56 +0000 (20:50 +0000)
* 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
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
tests/shell-test.c

index a0d66a2..a3a156b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index a0d66a2..a3a156b 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-24  Darin Adler  <darin@bentspoon.com>
+
+       * 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  <rsteinke@w-link.net>
 
        * glib/giochannel.c: Matthias Clasen's fix for
index 4787733..378c918 100644 (file)
@@ -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");