{
#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
"</head><body><textarea></textarea></body></html>"
-#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html><head></head><body><div><textarea style=\"-wap-input-format:"*<ja:h>";\"></textarea></div></body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><textarea style=\"-wap-input-format:"*M";\"></textarea></div></body></html>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "actual:[%s]\n", ret);
+ fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
{
#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
"</head><body><textarea></textarea></body></html>"
-#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html><head></head><body><div><textarea style=\"-wap-input-format:"*<ja:hk>";\"></textarea></div></body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><textarea style=\"-wap-input-format:"*M";\"></textarea></div></body></html>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "actual:[%s]\n", ret);
+ fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);
CU_ASSERT(call_check == 1);
- fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
- fprintf(stderr, "actual:[%s]\n", ret);
APR_TERM;
#undef TEST_STRING
{
#define TEST_STRING "<html><head><link rel=\"stylesheet\" href=\"http://localhost/a.css\" type=\"text/css\" />" \
"</head><body><textarea></textarea></body></html>"
-#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?><!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\"><html><head></head><body><div><textarea style=\"-wap-input-format:"*<ja:en>";\"></textarea></div></body></html>"
+#define RESULT_STRING "<?xml version='1.0' encoding='Shift_JIS' ?>" \
+ "<!DOCTYPE html PUBLIC \"-//J-PHONE//DTD XHTML Basic 1.0 Plus//EN\" \"html-basic10-plus.dtd\">" \
+ "<html><head></head><body><div><textarea style=\"-wap-input-format:"*m";\"></textarea></div></body></html>"
char *ret;
char *tmp;
device_table spec;
tmp = chxj_encoding(&r, TEST_STRING, &destlen);
ret = chxj_convert_jxhtml(&r, &spec, tmp, destlen, &destlen, &entry, &cookie);
ret = chxj_rencoding(&r, ret, &destlen);
+ fprintf(stderr, "actual:[%s]\n", ret);
+ fprintf(stderr, "expect:[%s]\n", RESULT_STRING);
CU_ASSERT(ret != NULL);
CU_ASSERT(strcmp(RESULT_STRING, ret) == 0);
CU_ASSERT(destlen == sizeof(RESULT_STRING)-1);