Index: /trunk/psLib/src/sys/psString.c
===================================================================
--- /trunk/psLib/src/sys/psString.c	(revision 6217)
+++ /trunk/psLib/src/sys/psString.c	(revision 6218)
@@ -13,6 +13,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-01-26 05:31:54 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-01-27 01:49:05 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -25,4 +25,5 @@
 #include "psMemory.h"
 #include "psError.h"
+#include "psConstants.h"
 
 #include "psErrorText.h"
@@ -168,4 +169,7 @@
                       const char *splitters)
 {
+    PS_ASSERT_PTR_NON_NULL(string, NULL);
+    PS_ASSERT_PTR_NON_NULL(splitters, NULL);
+
     psList *values = psListAlloc(NULL); // The list of values to return
     unsigned int length = strlen(string); // The length of the string
Index: /trunk/psLib/test/sys/tst_psString.c
===================================================================
--- /trunk/psLib/test/sys/tst_psString.c	(revision 6217)
+++ /trunk/psLib/test/sys/tst_psString.c	(revision 6218)
@@ -20,6 +20,6 @@
  *  @author  Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-01-26 23:31:22 $
+ *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2006-01-27 01:49:05 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -442,7 +442,7 @@
 {
     psList *strList = NULL;
-    char str[30];
+    char str[35];
     char split[5];
-    strncpy(str, "This is, a, test case, to check.", 30);
+    strncpy(str, "This is, a, test case, to check.", 35);
     strncpy(split, ",", 2);
     psString psStr;
@@ -456,4 +456,5 @@
     if (strList != NULL) {
         psFree(strList);
+        return 1;
     }
     //Return NULL for NULL string input
@@ -462,4 +463,5 @@
     if (strList != NULL) {
         psFree(strList);
+        return 2;
     }
     //Return NULL for NULL splitter input
@@ -468,18 +470,151 @@
     if (strList != NULL) {
         psFree(strList);
-    }
-
-
-    /*
-        strList = psStringSplit(str, split);
-     
-        strList = psStringSplit(psStr, split);
-     
-        strList = psStringSplit(str, psSplit);
-     
-        strList = psStringSplit(psStr, psSplit);
-    */
-    //    psFree(strList);
-    return 0;
-}
-
+        return 3;
+    }
+    //Return a psList* of psStrings
+    strList = psStringSplit(str, split);
+    if (strList->n != 4) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return the correct number of strings.\n");
+        return 4;
+    }
+    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 5;
+    }
+    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 6;
+    }
+    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 7;
+    }
+    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 8;
+    }
+    psFree(strList);
+    //Return correct psList when using (psString, char*)
+    strList = psStringSplit(psStr, split);
+    if (strList->n != 4) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return the correct number of strings.\n");
+        return 9;
+    }
+    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 10;
+    }
+    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 11;
+    }
+    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 12;
+    }
+    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 13;
+    }
+    psFree(strList);
+    //Return correct psList when using (char*, psString)
+    strList = psStringSplit(str, psSplit);
+    if (strList->n != 4) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return the correct number of strings.\n");
+        return 14;
+    }
+    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 15;
+    }
+    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 16;
+    }
+    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 17;
+    }
+    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 18;
+    }
+    psFree(strList);
+    //Return correct psList when using (psString, psString)
+    strList = psStringSplit(psStr, psSplit);
+    if (strList->n != 4) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return the correct number of strings.\n");
+        return 19;
+    }
+    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 20;
+    }
+    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 21;
+    }
+    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 22;
+    }
+    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 23;
+    }
+    psFree(strList);
+    //Return correct psList output for string of zero length case
+    strncpy(str, "This is,, a,, test case,, to check.", 35);
+    strList = psStringSplit(str, split);
+    if (strList->n != 4) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return the correct number of strings.\n");
+        return 24;
+    }
+    if ( strncmp((psString)(strList->head->data), "This is", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 25;
+    }
+    if ( strncmp((psString)(strList->head->next->data), " a", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 26;
+    }
+    if ( strncmp((psString)(strList->head->next->next->data), " test case", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 27;
+    }
+    if ( strncmp((psString)(strList->head->next->next->next->data), " to check.", 10) ) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psStringSplit failed to return expected strings.");
+        return 28;
+    }
+
+    psFree(strList);
+    psFree(psStr);
+    psFree(psSplit);
+    return 0;
+}
+
Index: /trunk/psLib/test/sys/verified/tst_psString.stderr
===================================================================
--- /trunk/psLib/test/sys/verified/tst_psString.stderr	(revision 6217)
+++ /trunk/psLib/test/sys/verified/tst_psString.stderr	(revision 6218)
@@ -125,2 +125,23 @@
 ---> TESTPOINT PASSED (psString{Test prepend null-op} | tst_psString.c)
 
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psString.c                                             *
+*            TestPoint: psString{Test String Splitting}                            *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+<DATE><TIME>|<HOST>|I|testStrSplit00
+    Following should generate error message
+<DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO)
+    Unallowable operation: string is NULL.
+<DATE><TIME>|<HOST>|I|testStrSplit00
+    Following should generate error message
+<DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO)
+    Unallowable operation: string is NULL.
+<DATE><TIME>|<HOST>|I|testStrSplit00
+    Following should generate error message
+<DATE><TIME>|<HOST>|E|psStringSplit (FILE:LINENO)
+    Unallowable operation: splitters is NULL.
+
+---> TESTPOINT PASSED (psString{Test String Splitting} | tst_psString.c)
+
