mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-14 07:33:46 +01:00
The test suite needs to exit with non-zero if a test fails.
This commit is contained in:
parent
f30591b9cb
commit
c2e262abdd
@ -1,22 +1,22 @@
|
|||||||
/* See LICENSE file for license and copyright information */
|
/* See LICENSE file for license and copyright information */
|
||||||
|
|
||||||
#include <check.h>
|
#include <check.h>
|
||||||
#include <girara/macros.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define UNUSED(x) GIRARA_UNUSED(x)
|
|
||||||
|
|
||||||
Suite* suite_utils();
|
Suite* suite_utils();
|
||||||
|
|
||||||
int main(int UNUSED(argc), char *UNUSED(argv[]))
|
int main()
|
||||||
{
|
{
|
||||||
Suite* suite = NULL;
|
Suite* suite = NULL;
|
||||||
SRunner* suite_runner = NULL;
|
SRunner* suite_runner = NULL;
|
||||||
|
int number_failed = 0;
|
||||||
|
|
||||||
/* test utils */
|
/* test utils */
|
||||||
suite = suite_utils();
|
suite = suite_utils();
|
||||||
suite_runner = srunner_create(suite);
|
suite_runner = srunner_create(suite);
|
||||||
srunner_run_all(suite_runner, CK_NORMAL);
|
srunner_run_all(suite_runner, CK_NORMAL);
|
||||||
|
number_failed += srunner_ntests_failed(suite_runner);
|
||||||
srunner_free(suite_runner);
|
srunner_free(suite_runner);
|
||||||
|
|
||||||
return 0;
|
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user