From: <gn...@us...> - 2003-12-07 11:50:35
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Requests In directory sc8-pr-cvs1:/tmp/cvs-serv18901/src/ICSharpCode.Tests/SharpCvsLib/Requests Modified Files: ValidResponsesRequestTest.cs Log Message: Fixed minor bug in splitting up the request string. Index: ValidResponsesRequestTest.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Requests/ValidResponsesRequestTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ValidResponsesRequestTest.cs 5 Nov 2003 08:07:36 -0000 1.3 --- ValidResponsesRequestTest.cs 7 Dec 2003 11:50:32 -0000 1.4 *************** *** 94,97 **** --- 94,101 ---- string[] responses; + // Need to remove terminating '\n' to simplify Split() + if (requestString.Length > 0 && requestString[requestString.Length - 1] == '\n') { + requestString = requestString.Substring(0, requestString.Length - 1); + } // split the responses in the request into seperate strings responses = requestString.Split(null); *************** *** 122,125 **** --- 126,133 ---- int responseClasses = 0; + // Need to remove terminating '\n' to simplify Split() + if (requestString.Length > 0 && requestString[requestString.Length - 1] == '\n') { + requestString = requestString.Substring(0, requestString.Length - 1); + } // split the responses in the request into seperate strings // remember first entry will be the response name |