void test_chtml20_title_tag_001();
void test_chtml20_title_tag_002();
+
+void test_chtml20_ul_tag_001();
+void test_chtml20_ul_tag_002();
+void test_chtml20_ul_tag_003();
+void test_chtml20_ul_tag_004();
+void test_chtml20_ul_tag_005();
/* pend */
int
CU_add_test(chtml20_suite, "test <title> 1." , test_chtml20_title_tag_001);
CU_add_test(chtml20_suite, "test <title> 2." , test_chtml20_title_tag_002);
+
+ CU_add_test(chtml20_suite, "test <ul> 1." , test_chtml20_ul_tag_001);
+ CU_add_test(chtml20_suite, "test <ul> 2." , test_chtml20_ul_tag_002);
+ CU_add_test(chtml20_suite, "test <ul> 3." , test_chtml20_ul_tag_003);
+ CU_add_test(chtml20_suite, "test <ul> 4." , test_chtml20_ul_tag_004);
+ CU_add_test(chtml20_suite, "test <ul> 5." , test_chtml20_ul_tag_005);
/* aend */
CU_basic_run_tests();
#undef TEST_STRING
#undef RESULT_STRING
}
+/*============================================================================*/
+/* <UL> */
+/*============================================================================*/
+void test_chtml20_ul_tag_001()
+{
+#define TEST_STRING "<ul>"
+#define RESULT_STRING "<ul></ul>"
+ 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_ul_tag_002()
+{
+#define TEST_STRING "<ul></ul>"
+#define RESULT_STRING "<ul></ul>"
+ 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_ul_tag_003()
+{
+#define TEST_STRING "<ul><li></ul>"
+#define RESULT_STRING "<ul><li></ul>"
+ 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_ul_tag_004()
+{
+#define TEST_STRING "<ul abc><li></ul>"
+#define RESULT_STRING "<ul><li></ul>"
+ 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_ul_tag_005()
+{
+#define TEST_STRING "<ul abc><li>abc</ul>"
+#define RESULT_STRING "<ul><li>abc</ul>"
+ 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
*/