Browse Source

Added test case for #1065

Yuji Hirose 4 năm trước cách đây
mục cha
commit
301faa074c
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      test/test.cc

+ 6 - 0
test/test.cc

@@ -171,6 +171,12 @@ TEST(GetHeaderValueTest, RegularValue) {
   EXPECT_STREQ("text/html", val);
 }
 
+TEST(GetHeaderValueTest, RegularValueWithDifferentCase) {
+  Headers headers = {{"Content-Type", "text/html"}, {"Dummy", "Dummy"}};
+  auto val = detail::get_header_value(headers, "content-type", 0, "text/plain");
+  EXPECT_STREQ("text/html", val);
+}
+
 TEST(GetHeaderValueTest, SetContent) {
   Response res;