[glib: 2/3] testgdate: Exit with failure if there are not passed tests



commit d407b9e70560db0fd34ef2c2c760b1c9b7119d87
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Nov 27 17:09:09 2019 +0100

    testgdate: Exit with failure if there are not passed tests

 tests/testgdate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tests/testgdate.c b/tests/testgdate.c
index 18022bc74..9e2ace22f 100644
--- a/tests/testgdate.c
+++ b/tests/testgdate.c
@@ -8,6 +8,7 @@
 #include "glib.h"
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <locale.h>
 #include <time.h>
@@ -506,7 +507,7 @@ g_print ("testing %d years\n", n_check_years);
   
   g_print("\n%u tests passed, %u failed\n",passed, notpassed);
 
-  return 0;
+  return (notpassed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]