testgdate: Exit with failure if there are not passed tests

This commit is contained in:
Marco Trevisan (Treviño) 2019-11-27 17:09:09 +01:00
parent c08d58d778
commit d407b9e705

View File

@ -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;
}