47 int result, num_stealing = 0;
54 fail_unless(race_arch != NULL,
"Cannot find halfing arch to test on.");
57 fail_unless(class_arch != NULL,
"Cannot find thief class to test on.");
61 fail_unless(ns.
faces_sent != NULL,
"Could not allocate socket space to remember what faces are sent.");
64 fail_unless(
pl != NULL,
"Could not create a player to handle.");
70 fail_unless(
result == 0,
"Could not apply race and class to player.");
79 ob_inv = ob_inv->
below;
82 fail_unless(num_stealing < 2,
"Found duplicate stealing skills in player inventory.");
83 fail_unless(num_stealing > 0,
"Failed to find any stealing skills in player inventory.");
91 Suite *s = suite_create(
"bug");
92 TCase *tc_core = tcase_create(
"Core");
96 suite_add_tcase(s, tc_core);
97 tcase_add_test(tc_core, test_skills);
98 tcase_set_timeout(tc_core, 0);
106 SRunner *sr = srunner_create(s);
108 srunner_set_fork_status(sr, CK_NOFORK);
112 srunner_set_xml(sr, LOGDIR
"/bugs/bugtrack/duplicate_skills.xml");
113 srunner_set_log(sr, LOGDIR
"/bugs/bugtrack/duplicate_skills.out");
114 srunner_run_all(sr, CK_ENV);
115 nf = srunner_ntests_failed(sr);
117 return nf == 0 ? EXIT_SUCCESS : EXIT_FAILURE;