Pārlūkot izejas kodu

Enhanced logger parse format testcase

Yann Weber 5 gadus atpakaļ
vecāks
revīzija
fd9fc2fb47
1 mainītis faili ar 7 papildinājumiem un 2 dzēšanām
  1. 7
    2
      tests/check_logger.c

+ 7
- 2
tests/check_logger.c Parādīt failu

@@ -397,12 +397,17 @@ START_TEST(test_logger_format_parse1)
397 397
 	ck_assert_int_eq(conf->format_sz, 1);
398 398
 	ck_assert_int_eq(s, 0);
399 399
 	ck_assert_str_eq(conf->formats[s].fmt, fmt);
400
+	ck_assert_int_eq(conf->formats[s].nfield, 9);
400 401
 	for(i=0; i<9; i++)
401 402
 	{
402
-dprintf(2, "I=%d\n", i);
403 403
 		ck_assert_int_eq(conf->formats[s].fields[i].type, types[i]);
404 404
 	}
405
-	ck_assert_int_eq(conf->formats[s].nfield, 9);
405
+	ck_assert_str_eq(conf->formats[s].fields[1].val, " ");
406
+	ck_assert_str_eq(conf->formats[s].fields[3].val, " ");
407
+	ck_assert_str_eq(conf->formats[s].fields[5].val, "[");
408
+	ck_assert_str_eq(conf->formats[s].fields[7].val, "] ");
409
+	ck_assert_str_eq(conf->formats[s].fields[0].args.datetime.format,
410
+	                 PYFCGI_LOGGER_TIME_FMT_DEFAULT);
406 411
 
407 412
 }
408 413
 END_TEST

Notiek ielāde…
Atcelt
Saglabāt