Index: trunk/psLib/test/types/tap_psMetadataConfig_input.c
===================================================================
--- trunk/psLib/test/types/tap_psMetadataConfig_input.c	(revision 9747)
+++ trunk/psLib/test/types/tap_psMetadataConfig_input.c	(revision 9750)
@@ -12,4 +12,7 @@
 #include <pslib.h>
 #include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
 
 #include "tap.h"
@@ -22,5 +25,5 @@
 int main(void)
 {
-    plan_tests(4);
+    plan_tests(10);
 
     diag("Tests for psMetadataConfig Input Functions");
@@ -39,5 +42,5 @@
     unsigned int nfail = 0;
     md = psMetadataAlloc();
-    psMetadataAddS32(md, PS_LIST_HEAD, "new S32", 0, "", 666);
+    psMetadataAddS32(md, PS_LIST_HEAD, "new_S32", 0, "", 666);
 
     //Return NULL for NULL filename input
@@ -47,5 +50,5 @@
             "psMetadataConfigRead:           return NULL for NULL filename input.");
     }
-    //Return false for invalid filename input
+    //Return NULL for invalid filename input
     {
         out = psMetadataConfigRead(out, &nfail, ".", false);
@@ -53,11 +56,33 @@
             "psMetadataConfigRead:           return NULL for invalid filename input.");
     }
+    //Return NULL for missing file input
+    {
+        out = psMetadataConfigRead(out, &nfail, "table4.dat", false);
+        ok( out == NULL,
+            "psMetadataConfigRead:           return NULL for missing file input.");
+    }
+    //Return empty metadata for read-only file with invalid syntax
+    {
+        out = psMetadataConfigRead(out, &nfail, "table3.dat", false);
+        ok( out != NULL && out->list->n == 0,
+            "psMetadataConfigRead:           return empty metadata for file"
+            " with invalid syntax.");
+        psFree(out);
+        out = NULL;
+    }
     //Return true for valid inputs
     {
-        skip_start(  !psMetadataConfigWrite(md, "mdcfg.wrt"), 1,
-                     "Skipping 1 tests because psMetadataConfigWrite failed");
+        skip_start(  !psMetadataConfigWrite(md, "mdcfg.wrt"), 2,
+                     "Skipping 2 tests because psMetadataConfigWrite failed");
         out = psMetadataConfigRead(out, &nfail, "mdcfg.wrt", false);
-        ok( out != NULL,
+        psMetadataItem *tempItem = psMetadataGet(out, PS_LIST_HEAD);
+        ok( out != NULL && nfail == 0,
             "psMetadataConfigRead:           return correct metadata for valid inputs.");
+        skip_start(  tempItem == NULL, 1,
+                     "Skipping 1 tests because metadata container is empty!");
+        ok_str( tempItem->name, "new_S32",
+                "psMetadataConfigRead:           return correct metadataItem from "
+                "returned metadata.");
+        skip_end();
         skip_end();
     }
@@ -76,50 +101,84 @@
 {
     diag("  >>>Test 2:  psMetadataConfigParse");
+    psMetadata *out = NULL;
+    unsigned int nfail = 0;
+    char str1[30];
+    strcpy(str1, "-10.05    2        4");
+    char str2[30];
+    strcpy(str2, "\nnew S32       666\n");
+
+    //Return NULL for NULL string input
+    {
+        out = psMetadataConfigParse(out, &nfail, NULL, false);
+        ok( out == NULL,
+            "psMetadataConfigParse:          return NULL for NULL string input.");
+    }
+    //Return correct metadata for correct string input
+    {
+        psFree(out);
+        out = NULL;
+        out = psMetadataConfigParse(out, NULL, str2, false);
+        psMetadataItem *tempItem = psMetadataGet(out, PS_LIST_HEAD);
+        ok( out != NULL && tempItem != NULL,
+            "psMetadataConfigParse:          return correct metadata for valid "
+            "string input.");
+    }
+    //Return empty metadata for incorrect string input
+    {
+        psFree(out);
+        out = NULL;
+        out = psMetadataConfigParse(out, NULL, str1, false);
+        psMetadataItem *tempItem = psMetadataGet(out, PS_LIST_HEAD);
+        ok( out != NULL && tempItem == NULL,
+            "psMetadataConfigParse:          return correct metadata for valid "
+            "string input.");
+        if (tempItem != NULL)
+            printf("\n\n name=%s\n", tempItem->name);
+    }
+
+
     /*    FILE *openfile;
-        openfile = fopen("mdcfg.prt", "w+");
-        FILE *nofile = NULL;
-        psMetadata *md = NULL;
-        md = psMetadataAlloc();
-     
-        //psMetadataConfigParse(psMetadata* md,unsigned int *nFail,const char *str,bool overwrite)
-     
-        //Return false for NULL metadata input
-        {
-            ok( !psMetadataConfigPrint(openfile, NULL),
-                 "psMetadataConfigPrint:           return false for NULL metadata input.");
-        }
-        //Return false for empty metadata input
-        {
-            ok( !psMetadataConfigPrint(openfile, md),
-                 "psMetadataConfigPrint:           return false for empty metadata input.");
-        }
-        //Return false for NULL file input
-        psMetadataAddS32(md, PS_LIST_HEAD, "new S32", 0, "", 666);
-        {
-            ok( !psMetadataConfigPrint(nofile, md),
-                 "psMetadataConfigPrint:           return false for NULL FILE* input.");
-        }
-        //Return false for read-only file input
-        nofile = fopen("mdcfg.prt", "r");
-        {
-            ok( !psMetadataConfigPrint(nofile, md),
-                 "psMetadataConfigPrint:           return false for read-only FILE* input.");
-        }
-        //Return true for valid inputs
-        {
-            ok( psMetadataConfigPrint(openfile, md),
-                "psMetadataConfigPrint:           return true for valid inputs.");
-        }
-     
-     
-        //Check for Memory leaks
-        {
-            fclose(nofile);
-            fclose(openfile);
-            psFree(md);
-            remove("mdcfg.prt");
-            checkMem();
-        }
-        */
+    openfile = fopen("mdcfg.prt", "w+");
+    FILE *nofile = NULL;
+    psMetadata *md = NULL;
+    md = psMetadataAlloc();
+
+    //psMetadataConfigParse(psMetadata* md,unsigned int *nFail,const char *str,bool overwrite)
+
+    //Return false for NULL metadata input
+    {
+        ok( !psMetadataConfigPrint(openfile, NULL),
+             "psMetadataConfigPrint:           return false for NULL metadata input.");
+    }
+    //Return false for empty metadata input
+    {
+        ok( !psMetadataConfigPrint(openfile, md),
+             "psMetadataConfigPrint:           return false for empty metadata input.");
+    }
+    //Return false for NULL file input
+    psMetadataAddS32(md, PS_LIST_HEAD, "new S32", 0, "", 666);
+    {
+        ok( !psMetadataConfigPrint(nofile, md),
+             "psMetadataConfigPrint:           return false for NULL FILE* input.");
+    }
+    //Return false for read-only file input
+    nofile = fopen("mdcfg.prt", "r");
+    {
+        ok( !psMetadataConfigPrint(nofile, md),
+             "psMetadataConfigPrint:           return false for read-only FILE* input.");
+    }
+    //Return true for valid inputs
+    {
+        ok( psMetadataConfigPrint(openfile, md),
+            "psMetadataConfigPrint:           return true for valid inputs.");
+    }
+
+    */
+    //Check for Memory leaks
+    {
+        psFree(out);
+        checkMem();
+    }
+
 }
 
Index: trunk/psLib/test/types/tap_psMetadataConfig_output.c
===================================================================
--- trunk/psLib/test/types/tap_psMetadataConfig_output.c	(revision 9747)
+++ trunk/psLib/test/types/tap_psMetadataConfig_output.c	(revision 9750)
@@ -124,34 +124,2 @@
 }
 
-
-/*
-void testLookupTableAlloc(void)
-{
-    diag("  >>>Test 1:  psLookupTableAlloc & psMemCheckLookupTable Fxns");
- 
-    psLookupTable *lt = NULL;
- 
-//Tests for psLookupTableAlloc
-   //Return NULL for NULL filename input
-    {
-        lt = psLookupTableAlloc(NULL, "\%f \%lf \%d \%ld", 10);
-        ok( lt == NULL,
-            "psLookupTableAlloc:               return NULL for NULL filename input.");
-    }
-    //Return correct vector output for valid inputs
-    {
-        vec = psLookupTableInterpolateAll(table2, 1);
-        skip_start(  vec == NULL, 1,
-                     "Skipping 1 tests because psLookupTableInterpolateAll failed");
-        ok_double(vec->data.F64[0], 1.0,
-                  "psLookupTableInterpolateAll:     return correct output vector for valid inputs.");
-        skip_end();
-    }
-    //Check for Memory leaks
-    {
-        psFree(lt);
-        checkMem();
-    }
-}
-*/
-
