@@ -3232,6 +3232,13 @@ class ServerTest : public ::testing::Test {
32323232 EXPECT_EQ (" h\n e\n\n l\n l\n o\n " , file.content );
32333233 }
32343234
3235+ {
3236+ const auto &file = get_file_value (files, " file2" );
3237+ EXPECT_EQ (" world.json" , file.filename );
3238+ EXPECT_EQ (" application/json" , file.content_type );
3239+ EXPECT_EQ (R"( {\n "world": true\n}\n)" , file.content );
3240+ }
3241+
32353242 {
32363243 const auto &file = get_file_value (files, " file3" );
32373244 EXPECT_TRUE (file.filename .empty ());
@@ -5239,7 +5246,7 @@ TEST_F(ServerTest, PostMultipartFileContentReceiver) {
52395246 {" text1" , " text default" , " " , " " },
52405247 {" text2" , " aωb" , " " , " " },
52415248 {" file1" , " h\n e\n\n l\n l\n o\n " , " hello.txt" , " text/plain" },
5242- {" file2" , " {\n \ " world\" , true\n }\n " , " world.json" , " application/json" },
5249+ {" file2" , R"( {\n "world": true\n}\n) " , " world.json" , " application/json" },
52435250 {" file3" , " " , " " , " application/octet-stream" },
52445251 };
52455252
@@ -5254,7 +5261,7 @@ TEST_F(ServerTest, PostMultipartPlusBoundary) {
52545261 {" text1" , " text default" , " " , " " },
52555262 {" text2" , " aωb" , " " , " " },
52565263 {" file1" , " h\n e\n\n l\n l\n o\n " , " hello.txt" , " text/plain" },
5257- {" file2" , " {\n \ " world\" , true\n }\n " , " world.json" , " application/json" },
5264+ {" file2" , R"( {\n "world": true\n}\n) " , " world.json" , " application/json" },
52585265 {" file3" , " " , " " , " application/octet-stream" },
52595266 };
52605267
0 commit comments