(main): If EXPECTED_STATUS is defined check that returned status from
authordrepper <drepper>
Sat, 7 Jun 2003 23:23:01 +0000 (23:23 +0000)
committerdrepper <drepper>
Sat, 7 Jun 2003 23:23:01 +0000 (23:23 +0000)
child matches.

test-skeleton.c

index e03e74f..b976428 100644 (file)
@@ -333,5 +333,16 @@ main (int argc, char *argv[])
     }
 
   /* Simply exit with the return value of the test.  */
+#ifndef EXPECTED_STATUS
   return WEXITSTATUS (status);
+#else
+  if (WEXITSTATUS (status) != EXPECTED_STATUS)
+    {
+      fprintf (stderr, "Expected status %d, got %d\n",
+              EXPECTED_STATUS, WEXITSTATUS (status));
+      exit (1);
+    }
+
+  return 0;
+#endif
 }