CU_add_test(xhtml_suite, "test <h3> with align attribute(right).", test_xhtml_h3_tag_008);
CU_add_test(xhtml_suite, "test <h3> with align attribute(center).", test_xhtml_h3_tag_009);
CU_add_test(xhtml_suite, "test <h3> with align attribute(unkown).", test_xhtml_h3_tag_010);
-#if 0
+ /*=========================================================================*/
+ /* <h4> */
+ /*=========================================================================*/
CU_add_test(xhtml_suite, "test <h4>.", test_xhtml_h4_tag_001);
CU_add_test(xhtml_suite, "test <h4> with value.", test_xhtml_h4_tag_002);
CU_add_test(xhtml_suite, "test <h4> with value(japanese).", test_xhtml_h4_tag_003);
CU_add_test(xhtml_suite, "test <h4> with align attribute(right).", test_xhtml_h4_tag_008);
CU_add_test(xhtml_suite, "test <h4> with align attribute(center).", test_xhtml_h4_tag_009);
CU_add_test(xhtml_suite, "test <h4> with align attribute(unkown).", test_xhtml_h4_tag_010);
+
+ /*=========================================================================*/
+ /* <h5> */
+ /*=========================================================================*/
+#if 0
CU_add_test(xhtml_suite, "test <h5>.", test_xhtml_h5_tag_001);
CU_add_test(xhtml_suite, "test <h5> with value.", test_xhtml_h5_tag_002);
CU_add_test(xhtml_suite, "test <h5> with value(japanese).", test_xhtml_h5_tag_003);
#undef TEST_STRING
#undef RESULT_STRING
}
-/* KONNO */
void test_xhtml_h4_tag_001()
{
-#define TEST_STRING "<html><head></head><body><h4></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4></h4></body></html>"
+#define TEST_STRING "<h4></h4>"
+#define RESULT_STRING "<h4></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_002()
{
-#define TEST_STRING "<html><head></head><body><h4>abc</h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4>abc</h4></body></html>"
+#define TEST_STRING "<h4>abc</h4>"
+#define RESULT_STRING "<h4>abc</h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_003()
{
-#define TEST_STRING "<html><head></head><body><h4>亀さん</h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4>亀さん</h4></body></html>"
+#define TEST_STRING "<h4>亀さん</h4>"
+#define RESULT_STRING "<h4>亀さん</h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_004()
{
-#define TEST_STRING "<html><head></head><body><h4>ハンカク</h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4>ハンカク</h4></body></html>"
+#define TEST_STRING "<h4>ハンカク</h4>"
+#define RESULT_STRING "<h4>ハンカク</h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_005()
{
-#define TEST_STRING "<html><head></head><body><h4 align></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4></h4></body></html>"
+#define TEST_STRING "<h4 align></h4>"
+#define RESULT_STRING "<h4></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_006()
{
-#define TEST_STRING "<html><head></head><body><h4 align=\"\"></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4></h4></body></html>"
+#define TEST_STRING "<h4 align=\"\"></h4>"
+#define RESULT_STRING "<h4></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_007()
{
-#define TEST_STRING "<html><head></head><body><h4 align=\"left\"></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4 align=\"left\"></h4></body></html>"
+#define TEST_STRING "<h4 align=\"left\"></h4>"
+#define RESULT_STRING "<h4 style=\"text-align:left\"></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_008()
{
-#define TEST_STRING "<html><head></head><body><h4 align=\"right\"></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4 align=\"right\"></h4></body></html>"
+#define TEST_STRING "<h4 align=\"right\"></h4>"
+#define RESULT_STRING "<h4 style=\"text-align:right\"></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_009()
{
-#define TEST_STRING "<html><head></head><body><h4 align=\"center\"></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4 align=\"center\"></h4></body></html>"
+#define TEST_STRING "<h4 align=\"center\"></h4>"
+#define RESULT_STRING "<h4 style=\"text-align:center\"></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
}
void test_xhtml_h4_tag_010()
{
-#define TEST_STRING "<html><head></head><body><h4 align=\"unkown\"></h4></body></html>"
-#define RESULT_STRING "<html><head></head><body><h4></h4></body></html>"
+#define TEST_STRING "<h4 align=\"unkown\"></h4>"
+#define RESULT_STRING "<h4></h4>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "ret=[%s]",ret);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
#undef TEST_STRING
#undef RESULT_STRING
}
+/* KONNO */
void test_xhtml_h5_tag_001()
{
#define TEST_STRING "<html><head></head><body><h5></h5></body></html>"