void test_chtml20_marquee_tag_016();
void test_chtml20_marquee_tag_017();
void test_chtml20_marquee_tag_018();
+
+void test_chtml20_meta_tag_001();
+void test_chtml20_meta_tag_002();
+void test_chtml20_meta_tag_003();
+void test_chtml20_meta_tag_004();
+void test_chtml20_meta_tag_005();
+void test_chtml20_meta_tag_006();
+void test_chtml20_meta_tag_007();
+void test_chtml20_meta_tag_008();
+void test_chtml20_meta_tag_009();
/* pend */
int
CU_add_test(chtml20_suite, "test <marquee> 16." , test_chtml20_marquee_tag_016);
CU_add_test(chtml20_suite, "test <marquee> 17." , test_chtml20_marquee_tag_017);
CU_add_test(chtml20_suite, "test <marquee> 18." , test_chtml20_marquee_tag_018);
+
+ CU_add_test(chtml20_suite, "test <meta> 1." , test_chtml20_meta_tag_001);
+ CU_add_test(chtml20_suite, "test <meta> 2." , test_chtml20_meta_tag_002);
+ CU_add_test(chtml20_suite, "test <meta> 3." , test_chtml20_meta_tag_003);
+ CU_add_test(chtml20_suite, "test <meta> 4." , test_chtml20_meta_tag_004);
+ CU_add_test(chtml20_suite, "test <meta> 5." , test_chtml20_meta_tag_005);
+ CU_add_test(chtml20_suite, "test <meta> 6." , test_chtml20_meta_tag_006);
+ CU_add_test(chtml20_suite, "test <meta> 7." , test_chtml20_meta_tag_007);
+ CU_add_test(chtml20_suite, "test <meta> 8." , test_chtml20_meta_tag_008);
+ CU_add_test(chtml20_suite, "test <meta> 9." , test_chtml20_meta_tag_009);
/* aend */
CU_basic_run_tests();
#undef TEST_STRING
#undef RESULT_STRING
}
+/*============================================================================*/
+/* <META> */
+/*============================================================================*/
+void test_chtml20_meta_tag_001()
+{
+#define TEST_STRING "<meta>"
+#define RESULT_STRING "<meta>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_002()
+{
+#define TEST_STRING "<meta http-equiv>"
+#define RESULT_STRING "<meta>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_003()
+{
+#define TEST_STRING "<meta http-equiv=\"\">"
+#define RESULT_STRING "<meta>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_004()
+{
+#define TEST_STRING "<meta http-equiv=\"content-type\">"
+#define RESULT_STRING "<meta http-equiv=\"content-type\">"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_005()
+{
+#define TEST_STRING "<meta http-equiv=\"abc\">"
+#define RESULT_STRING "<meta http-equiv=\"abc\">"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_006()
+{
+#define TEST_STRING "<meta content>"
+#define RESULT_STRING "<meta>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_007()
+{
+#define TEST_STRING "<meta content=\"\">"
+#define RESULT_STRING "<meta>"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_008()
+{
+#define TEST_STRING "<meta http-equiv=\"Content-Type\" content=\"text/html\">"
+#define RESULT_STRING "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-31J\">"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
+void test_chtml20_meta_tag_009()
+{
+#define TEST_STRING "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml\">"
+#define RESULT_STRING "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-31J\">"
+ char *ret;
+ char *tmp;
+ device_table spec;
+ chxjconvrule_entry entry;
+ cookie_t cookie;
+ apr_size_t destlen;
+ APR_INIT;
+
+ COOKIE_INIT(cookie);
+
+ SPEC_INIT(spec);
+ destlen = sizeof(TEST_STRING)-1;
+
+ tmp = chxj_encoding(&r, TEST_STRING, &destlen);
+ ret = chxj_exchange_chtml20(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
+ ret = chxj_rencoding(&r, ret, &destlen);
+ CU_ASSERT(ret != NULL);
+ CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
+ CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
+
+ APR_TERM;
+#undef TEST_STRING
+#undef RESULT_STRING
+}
/*
* vim:ts=2 et
*/