Index: trunk/psLib/test/sys/tst_psString.c
===================================================================
--- trunk/psLib/test/sys/tst_psString.c	(revision 6218)
+++ trunk/psLib/test/sys/tst_psString.c	(revision 6278)
@@ -20,6 +20,6 @@
  *  @author  Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-01-27 01:49:05 $
+ *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2006-02-01 20:40:56 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -52,4 +52,5 @@
 
 static psS32 testStrSplit00(void);
+static psS32 testNULLStrings(void);
 
 testDescription tests[] = {
@@ -72,4 +73,5 @@
                               {testStrPrepend03,14, "Test prepend null-op", 0, false},
                               {testStrSplit00,15, "Test String Splitting", 0, false},
+                              {testNULLStrings,666, "Test NULL String Error Handling", 0, false},
                               {NULL}
                           };
@@ -619,2 +621,77 @@
 }
 
+static psS32 testNULLStrings(void)
+{
+    psString nullTest = NULL;
+    psString output = NULL;
+    ssize_t outSize = 0;
+    char** nullDest = NULL;
+    char** test;
+    //psStringCopy should return NULL for NULL input string
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    output = psStringCopy(nullTest);
+    if (output != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringCopy failed to return NULL for NULL input string.\n");
+        return 1;
+    }
+    //psStringNCopy should return NULL for NULL input string
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    output = psStringNCopy(nullTest, 100);
+    if (output != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringNCopy failed to return NULL for NULL input string.\n");
+        return 2;
+    }
+
+    //psStringAppend should return 0 for NULL input destination
+    outSize = psStringAppend(nullDest, "");
+    if (outSize != 0) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringAppend failed to return 0 for NULL input destination.\n");
+        return 3;
+    }
+    //psStringAppend should return 0 for NULL input format
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    outSize = psStringAppend(test, nullTest);
+    if (outSize != 0) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringAppend failed to return 0 for NULL input format.\n");
+        return 4;
+    }
+    //psStringPrepend should return 0 for NULL input destination
+    outSize = psStringPrepend(nullDest, " ");
+    if (outSize != 0) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringPrepend failed to return 0 for NULL input destination.\n");
+        return 3;
+    }
+    //psStringPrepend should return 0 for NULL input format
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    outSize = psStringPrepend(test, nullTest);
+    if (outSize != 0) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringPrepend failed to return 0 for NULL input format.\n");
+        return 4;
+    }
+    //psStringSplit should return NULL for NULL input string
+    psList *nullList = NULL;
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    nullList = psStringSplit(nullTest, ",");
+    if (nullList != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringSplit failed to return NULL for NULL input string.\n");
+        return 5;
+    }
+    //psStringSplit should return NULL for NULL input splitter
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    nullList = psStringSplit("Hello World", nullTest);
+    if (nullList != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psStringSplit failed to return NULL for NULL input splitter.\n");
+        return 6;
+    }
+
+    return 0;
+}
+
