Changeset 7045
- Timestamp:
- May 2, 2006, 1:55:53 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sys/tst_psString.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sys/tst_psString.c
r6989 r7045 20 20 * @author Eric Van Alst, MHPCC 21 21 * 22 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $23 * @date $Date: 2006-0 4-26 02:19:23 $22 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 23 * @date $Date: 2006-05-02 23:55:53 $ 24 24 * 25 25 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 455 455 //Return NULL for NULL inputs 456 456 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 457 strList = psStringSplit(NULL, NULL );457 strList = psStringSplit(NULL, NULL, true); 458 458 // if (strList != NULL) { 459 if ( psListLength(strList)) {459 if (strList) { 460 460 psFree(strList); 461 461 return 1; … … 465 465 //Return NULL for NULL string input 466 466 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 467 strList = psStringSplit(NULL, split );467 strList = psStringSplit(NULL, split, true); 468 468 // if (strList != NULL) { 469 469 if ( psListLength(strList) ) { … … 475 475 //Return NULL for NULL splitter input 476 476 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 477 strList = psStringSplit(str, NULL );477 strList = psStringSplit(str, NULL, true); 478 478 // if (strList != NULL) { 479 if ( psListLength(strList)) {479 if ( strList ) { 480 480 psFree(strList); 481 481 return 3; … … 484 484 strList = NULL; 485 485 //Return a psList* of psStrings 486 strList = psStringSplit(str, split );486 strList = psStringSplit(str, split, true); 487 487 if (strList->n != 4) { 488 488 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 512 512 psFree(strList); 513 513 //Return correct psList when using (psString, char*) 514 strList = psStringSplit(psStr, split );514 strList = psStringSplit(psStr, split, true); 515 515 if (strList->n != 4) { 516 516 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 540 540 psFree(strList); 541 541 //Return correct psList when using (char*, psString) 542 strList = psStringSplit(str, psSplit );542 strList = psStringSplit(str, psSplit, true); 543 543 if (strList->n != 4) { 544 544 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 568 568 psFree(strList); 569 569 //Return correct psList when using (psString, psString) 570 strList = psStringSplit(psStr, psSplit );570 strList = psStringSplit(psStr, psSplit, true); 571 571 if (strList->n != 4) { 572 572 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 597 597 //Return correct psList output for string of zero length case 598 598 strncpy(str, "This is,, a,, test case,, to check.", 35); 599 strList = psStringSplit(str, split );599 strList = psStringSplit(str, split, false); 600 600 if (strList->n != 4) { 601 601 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 687 687 psList *nullList = NULL; 688 688 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 689 nullList = psStringSplit(nullTest, "," );689 nullList = psStringSplit(nullTest, ",", true); 690 690 // if (nullList != NULL) { 691 691 if ( psListLength(nullList) ) { … … 698 698 //psStringSplit should return NULL for NULL input splitter 699 699 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 700 nullList = psStringSplit("Hello World", nullTest );700 nullList = psStringSplit("Hello World", nullTest, true); 701 701 // if (nullList != NULL) { 702 if ( psListLength(nullList)) {702 if ( nullList ) { 703 703 psError(PS_ERR_BAD_PARAMETER_NULL, false, 704 704 "psStringSplit failed to return NULL for NULL input splitter.\n");
Note:
See TracChangeset
for help on using the changeset viewer.
