Skip to content

Commit b891203

Browse files
committed
Test für RESERVIERE Bugreport 2746
Nicht einfach reproduzierbar, scheinbar.
1 parent 8e24290 commit b891203

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ static void test_make_temp(CuTest *tc) {
124124
CuAssertIntEquals(tc, 0, warning_count);
125125
}
126126

127+
static void test_reserve_each(CuTest *tc) {
128+
set_order_unit(newunit(1, 0));
129+
mock_input("ERESSEA 1 \"password\"\nEINHEIT 1\n@RESERVIERE je 1 Pferd\nNAECHSTER\n");
130+
error_count = warning_count = 0;
131+
process_order_file(0, 0);
132+
CuAssertIntEquals(tc, 0, error_count);
133+
CuAssertIntEquals(tc, 0, warning_count);
134+
}
135+
127136
static void test_destroy(CuTest *tc) {
128137
set_order_unit(newunit(1, 0));
129138
mock_input("ERESSEA 1 \"password\"\nEINHEIT 1\nZERSTOERE\nNAECHSTER\n");
@@ -236,7 +245,7 @@ int AddTestSuites(CuSuite *suite, const char *args) {
236245
char names[256], *name;
237246
size_t len;
238247
if (!args || strcmp(args, "all") == 0) {
239-
args = "echeck,process,give";
248+
args = "reserve,echeck,process,give,claim,entertain"; /* plant,common */
240249
}
241250
len = strlen(args);
242251
if (len >= sizeof(names)) {
@@ -280,6 +289,10 @@ int AddTestSuites(CuSuite *suite, const char *args) {
280289
cs = CuSuiteNew();
281290
SUITE_ADD_TEST(cs, test_entertain);
282291
CuSuiteAddSuite(suite, cs);
292+
} else if (strcmp(name, "reserve") == 0) {
293+
cs = CuSuiteNew();
294+
SUITE_ADD_TEST(cs, test_reserve_each);
295+
CuSuiteAddSuite(suite, cs);
283296
} else if (strcmp(name, "claim") == 0) {
284297
cs = CuSuiteNew();
285298
SUITE_ADD_TEST(cs, test_claim_nothing);

0 commit comments

Comments
 (0)