Browse Source

Check unit test framework has some limits with long strings

Error message was:
/home/travis/third-party/src/check-unit-test-framework/src/check_pack.c:306: Message string too long

Replace by strcmp check
bel 8 years ago
parent
commit
c610255e8b
1 changed files with 5 additions and 1 deletions
  1. 5 1
      test/public_server.c

+ 5 - 1
test/public_server.c

@@ -1122,10 +1122,14 @@ START_TEST(test_request_handlers)
 
 
 	opt = mg_get_option(ctx, "listening_ports");
 	opt = mg_get_option(ctx, "listening_ports");
 	ck_assert_str_eq(opt, HTTP_PORT);
 	ck_assert_str_eq(opt, HTTP_PORT);
+
 	opt = mg_get_option(ctx, "cgi_environment");
 	opt = mg_get_option(ctx, "cgi_environment");
-	ck_assert_str_ne(opt, "");
+	ck_assert_ptr_ne(opt, cgi_env_opt);
+    ck_assert(strcmp(opt, cgi_env_opt) == 0);
+
 	opt = mg_get_option(ctx, "throttle");
 	opt = mg_get_option(ctx, "throttle");
 	ck_assert_str_eq(opt, "");
 	ck_assert_str_eq(opt, "");
+
 	opt = mg_get_option(ctx, "unknown_option_name");
 	opt = mg_get_option(ctx, "unknown_option_name");
 	ck_assert(opt == NULL);
 	ck_assert(opt == NULL);