|
|
@@ -14,16 +14,16 @@
|
|
|
#include "testdata.h"
|
|
|
#include "helper.h"
|
|
|
|
|
|
-#define BAD_HEADER_STR "This is a bad header\n"
|
|
|
-const char bad_header[] =
|
|
|
+#define NO_COLON_STR "This is a bad header\n"
|
|
|
+const char no_colon_msg[] =
|
|
|
"Date: Tue, 22 Feb 2011 00:15:59 +1100\n"
|
|
|
- BAD_HEADER_STR
|
|
|
+ NO_COLON_STR
|
|
|
"From: Mister From <from@example.com>\n"
|
|
|
"To: Mizz To <to@example.org>\n"
|
|
|
"Subject: Some subject\n"
|
|
|
"Message-ID: <20110221131559.GA28327@example>\n";
|
|
|
|
|
|
-static void test_bad_header(const char *buf, size_t len)
|
|
|
+static void test_no_colon(const char *buf, size_t len)
|
|
|
{
|
|
|
struct rfc822_msg *msg;
|
|
|
struct rfc822_header *hdr;
|
|
|
@@ -50,7 +50,7 @@ static void test_bad_header(const char *buf, size_t len)
|
|
|
hfull = rfc822_header_raw_content(msg, hdr);
|
|
|
allocation_failure_check();
|
|
|
|
|
|
- ok(bytestring_eq(hfull, BYTESTRING(BAD_HEADER_STR)),
|
|
|
+ ok(bytestring_eq(hfull, BYTESTRING(NO_COLON_STR)),
|
|
|
"Invalid header content");
|
|
|
|
|
|
rfc822_free(msg);
|
|
|
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
|
|
|
{
|
|
|
failtest_setup(argc, argv);
|
|
|
|
|
|
- test_bad_header(bad_header, sizeof(bad_header));
|
|
|
+ test_no_colon(no_colon_msg, sizeof(no_colon_msg));
|
|
|
|
|
|
/* This exits depending on whether all tests passed */
|
|
|
failtest_exit(exit_status());
|