OSDN Git Service

* Added test code of the <form> tag 7 for au XHTML converter.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Sun, 13 Apr 2008 10:16:22 +0000 (10:16 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Sun, 13 Apr 2008 10:16:22 +0000 (10:16 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_11_0@2211 1a406e8e-add9-4483-a2c8-d8cac5b7c224

test/chxj_xhtml_mobile_1_0/test_chxj_xhtml_mobile_1_0.c

index 935a426..ec93734 100644 (file)
@@ -534,8 +534,8 @@ main()
   CU_add_test(xhtml_suite, "test <form method=\"get\">.",                       test_xhtml_form_tag_004);
   CU_add_test(xhtml_suite, "test <form method=\"abc\">.",                       test_xhtml_form_tag_005);
   CU_add_test(xhtml_suite, "test <form action>.",                               test_xhtml_form_tag_006);
-#if 0
   CU_add_test(xhtml_suite, "test <form action> with null cookie.",              test_xhtml_form_tag_007);
+#if 0
   CU_add_test(xhtml_suite, "test <form action> with other site .",              test_xhtml_form_tag_008);
   CU_add_test(xhtml_suite, "test <form action method>.",                        test_xhtml_form_tag_009);
 
@@ -2945,11 +2945,10 @@ void test_xhtml_form_tag_006()
 #undef TEST_STRING
 #undef RESULT_STRING
 }
-/* KONNO */
 void test_xhtml_form_tag_007() 
 {
-#define  TEST_STRING "<html><head></head><body><form action></form></body></html>"
-#define  RESULT_STRING "<html><head></head><body><form action=\"\"></form></body></html>"
+#define  TEST_STRING "<form action></form>"
+#define  RESULT_STRING "<form action=\"\"></form>"
   char  *ret;
   char  *tmp;
   device_table spec;
@@ -2966,6 +2965,7 @@ void test_xhtml_form_tag_007()
   tmp = chxj_encoding(&r, TEST_STRING, &destlen);
   ret = chxj_exchange_xhtml_mobile_1_0(&r, &spec, tmp, destlen, &destlen, &entry, NULL);
   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);
@@ -2974,6 +2974,7 @@ void test_xhtml_form_tag_007()
 #undef TEST_STRING
 #undef RESULT_STRING
 }
+/* KONNO */
 void test_xhtml_form_tag_008() 
 {
 #define  TEST_STRING "<html><head></head><body><form action=\"http://www.google.co.jp/\"></form></body></html>"