corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [02/12] incubator-corinthia git commit: Use dotted notation for function names in *.test
Date Fri, 19 Dec 2014 15:09:23 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak03.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak03.test b/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak03.test
index ffd53df..12756fc 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak03.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak03.test
@@ -1,4 +1,4 @@
-Word_testCreate();
+ooxml.word.create
 #item input.html
 <!DOCTYPE html>
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak04.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak04.test b/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak04.test
index dc3823a..12856a1 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak04.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/create-linebreak04.test
@@ -1,4 +1,4 @@
-Word_testCreate();
+ooxml.word.create
 #item input.html
 <!DOCTYPE html>
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp01.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp01.test b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp01.test
index 86aebbd..5f49493 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp01.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp01.test
@@ -1,4 +1,4 @@
-Word_testCreate({ document: true });
+ooxml.word.create({ document: true });
 #item input.html
 <!DOCTYPE html>
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp02.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp02.test b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp02.test
index 306882e..9972dfa 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp02.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp02.test
@@ -1,4 +1,4 @@
-Word_testCreate({ document: true });
+ooxml.word.create({ document: true });
 #item input.html
 <!DOCTYPE html>
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp03.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp03.test b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp03.test
index 92c8c43..31ed802 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp03.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp03.test
@@ -1,4 +1,4 @@
-Word_testCreate({ document: true });
+ooxml.word.create({ document: true });
 #item input.html
 <!DOCTYPE html>
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp04.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp04.test b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp04.test
index 3a213e0..28815f4 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp04.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/create-nbsp04.test
@@ -1,4 +1,4 @@
-Word_testCreate({ document: true });
+ooxml.word.create({ document: true });
 #item input.html
 <!DOCTYPE html>
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak01.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak01.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak01.test
index 9f0801e..a9fac07 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak01.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak01.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak02.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak02.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak02.test
index 95f4ebb..a0e344c 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak02.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak02.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak03.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak03.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak03.test
index 8c6feb7..c679288 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak03.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak03.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak04.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak04.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak04.test
index bb552ad..9c51228 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak04.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-linebreak04.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp01.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp01.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp01.test
index e36ce25..214ae6a 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp01.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp01.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp02.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp02.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp02.test
index 558ab01..86ddf1c 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp02.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp02.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp03.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp03.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp03.test
index 1908e04..804e8b1 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp03.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp03.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp04.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp04.test b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp04.test
index 7769dbb..924b982 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp04.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/get-nbsp04.test
@@ -1,4 +1,4 @@
-Word_testGet();
+ooxml.word.get
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak01.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak01.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak01.test
index bbe137b..c31c36f 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak01.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak01.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak02.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak02.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak02.test
index cd5e1d5..c43814e 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak02.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak02.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak03.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak03.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak03.test
index 432b28a..923edb8 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak03.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak03.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak04.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak04.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak04.test
index 0879c56..d045214 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak04.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-linebreak04.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp01.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp01.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp01.test
index 1e9c281..fc865d8 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp01.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp01.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp02.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp02.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp02.test
index 1cd7cda..8409b5a 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp02.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp02.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp03.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp03.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp03.test
index 0a68caf..8357d28 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp03.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp03.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp04.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp04.test b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp04.test
index d72d94a..7b5d6aa 100644
--- a/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp04.test
+++ b/DocFormats/filters/ooxml/tests/word/whitespace/nullupdate-nbsp04.test
@@ -1,4 +1,4 @@
-Word_testUpdate();
+ooxml.word.put
 #item input.docx
 ##item document.xml
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/consumers/dfutil/src/Test.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/Test.c b/consumers/dfutil/src/Test.c
index 8b02c63..322bbe2 100644
--- a/consumers/dfutil/src/Test.c
+++ b/consumers/dfutil/src/Test.c
@@ -93,6 +93,14 @@ static const char **parseCommand(const char *command, DFError **error)
     const char *openbr = strchr(command,'(');
     const char *closebr = strrchr(command,')');
 
+    if ((openbr == NULL) && (closebr == NULL)) {
+        DFArray *array = DFArrayNew((DFCopyFunction)strdup,free);
+        DFArrayAppend(array,(void *)command);
+        const char **result = DFStringArrayFlatten(array);
+        DFArrayRelease(array);
+        return result;
+    }
+
     if ((openbr == NULL) || (closebr == NULL)) {
         DFErrorFormat(error,"Malformed command: %s\n",command);
         return NULL;

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d72983d4/consumers/dfutil/src/TestFunctions.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/TestFunctions.c b/consumers/dfutil/src/TestFunctions.c
index e264126..1d09a33 100644
--- a/consumers/dfutil/src/TestFunctions.c
+++ b/consumers/dfutil/src/TestFunctions.c
@@ -59,42 +59,13 @@ TestGroup *allGroups[] = {
     NULL
 };
 
-static struct {
-    const char *oldName;
-    const char *newName;
-} substitutions[] = {
-    { "CSS_setHeadingNumbering", "core.css.setHeadingNumbering" },
-    { "Word_testCollapseBookmarks", "ooxml.word.collapseBookmarks" },
-    { "Word_testExpandBookmarks", "ooxml.word.expandBookmarks" },
-    { "Word_testGet", "ooxml.word.get" },
-    { "Word_testCreate", "ooxml.word.create" },
-    { "Word_testUpdate", "ooxml.word.put" },
-    { "LaTeX_testCreate", "latex.create" },
-    { "HTML_testNormalize", "core.html.normalize" },
-    { "HTML_showChanges", "core.html.showChanges" },
-    { "CSS_test", "core.css.parse" },
-    { "move", "core.bdt.move" },
-    { "remove", "core.bdt.removeChildren" },
-    { NULL, NULL },
-};
-
 void runTest(const char *name)
 {
-    const char *actualName = name;
-    for (int i = 0; substitutions[i].oldName != NULL; i++) {
-        if (!strcmp(name,substitutions[i].oldName)) {
-            actualName = substitutions[i].newName;
-        }
-    }
-    TestCase *tc = utlookup(allGroups,actualName);
+    TestCase *tc = utlookup(allGroups,name);
     if (tc != NULL) {
         tc->fun();
         return;
     }
 
-    printf("runTest %s\n",name);
-    for (int i = 0; i < utgetargc(); i++) {
-        printf("    utgetargv()[%d] = %s\n",i,utgetargv()[i]);
-    }
     DFBufferFormat(utgetoutput(),"Unknown test: %s\n",name);
 }


Mime
View raw message