about summary refs log tree commit diff
path: root/test-skeleton.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-skeleton.c')
-rw-r--r--test-skeleton.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test-skeleton.c b/test-skeleton.c
index e03e74fda6..b9764285f0 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -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
 }