| 551 | #include "gtest/gtest.h" |
| 552 | |
| 553 | TEST(Parser, internal_find_header) { |
| 554 | char data[] = "OPTIONS sip:server SIP/2.0\r\n" |
| 555 | "Took: abc1\r\n" |
| 556 | "To k: abc2\r\n" |
| 557 | "To\t :\r\n abc3\r\n" |
| 558 | "From: def\r\n" |
| 559 | "\r\n"; |
| 560 | const char *eq = strstr(data, "To\t :"); |
| 561 | EXPECT_STREQ(eq, internal_find_header(data, "To", "t", false)); |
| 562 | EXPECT_STREQ(eq + 8, internal_find_header(data, "To", "t", true)); |
| 563 | } |
| 564 | |
| 565 | TEST(Parser, internal_find_header_no_callid_missing_cr_in_to) { |
| 566 | char data[4096]; |
nothing calls this directly
no test coverage detected