From: Clayton H. <dr...@us...> - 2004-11-03 06:00:51
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/FileSystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29813/src/ICSharpCode.Tests/SharpCvsLib/FileSystem Modified Files: PathTranslatorTest.cs Log Message: Bug fixes for unit tests. Index: PathTranslatorTest.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/FileSystem/PathTranslatorTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PathTranslatorTest.cs 28 Oct 2004 06:42:21 -0000 1.8 --- PathTranslatorTest.cs 3 Nov 2004 06:00:10 -0000 1.9 *************** *** 133,140 **** pathTranslator = new PathTranslator (workingDirectory, REPOS_FILE_PATH1); - LOGGER.Debug ("pathTranslator=[" + pathTranslator.ToString () + "]"); Assert.AreEqual("/cvsroot/sharpcvslib", pathTranslator.CvsRoot.CvsRepository, pathTranslator.CvsRoot.CvsRepository); ! Assert.AreEqual ("src/ICSharpCode/SharpCvsLib/FileSystem/", pathTranslator.RelativePath); Assert.AreEqual ("PathTranslator.cs", pathTranslator.Filename); String expectedLocalPath = --- 133,141 ---- pathTranslator = new PathTranslator (workingDirectory, REPOS_FILE_PATH1); Assert.AreEqual("/cvsroot/sharpcvslib", pathTranslator.CvsRoot.CvsRepository, pathTranslator.CvsRoot.CvsRepository); ! ! // BREAKING CHANGE **** ! Assert.AreEqual ("sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/PathTranslator.cs", pathTranslator.RelativePath); Assert.AreEqual ("PathTranslator.cs", pathTranslator.Filename); String expectedLocalPath = *************** *** 160,168 **** Assert.AreEqual ("/cvsroot/sharpcvslib", pathTranslator.CvsRoot.CvsRepository, pathTranslator.CvsRoot.CvsRepository); ! Assert.AreEqual (pathTranslator.RelativePath, "src/ICSharpCode/SharpCvsLib/FileSystem/", pathTranslator.RelativePath); ! Assert.AreEqual (Path.DirectorySeparatorChar.ToString(), pathTranslator.Filename); String expectedLocalPath = PathTranslator.ConvertToOSSpecificPath (Path.Combine (LOCAL_DIR1, "src/ICSharpCode/SharpCvsLib/FileSystem/")); ! Assert.AreEqual (pathTranslator.LocalPath, expectedLocalPath, pathTranslator.LocalPath); Assert.AreEqual (expectedLocalPath, pathTranslator.LocalPathAndFilename); Assert.IsTrue (pathTranslator.IsDirectory == true); --- 161,169 ---- Assert.AreEqual ("/cvsroot/sharpcvslib", pathTranslator.CvsRoot.CvsRepository, pathTranslator.CvsRoot.CvsRepository); ! Assert.AreEqual ("sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/", pathTranslator.RelativePath, pathTranslator.RelativePath); ! Assert.AreEqual ("dev-src", pathTranslator.Filename); String expectedLocalPath = PathTranslator.ConvertToOSSpecificPath (Path.Combine (LOCAL_DIR1, "src/ICSharpCode/SharpCvsLib/FileSystem/")); ! Assert.AreEqual (expectedLocalPath, pathTranslator.LocalPath, pathTranslator.LocalPath); Assert.AreEqual (expectedLocalPath, pathTranslator.LocalPathAndFilename); Assert.IsTrue (pathTranslator.IsDirectory == true); *************** *** 203,210 **** Assert.IsTrue(PathTranslator.IsCvsDir ("c:\\temp\\cvs")); Assert.IsTrue(PathTranslator.IsCvsDir ("c:\\temp\\cVs")); ! Assert.IsTrue(PathTranslator.IsCvsDir ("c:\\temp\\cVs\\Crap")); Assert.IsTrue(!PathTranslator.IsCvsDir ("c:\\temp\\testCvs\\")); Assert.IsTrue(!PathTranslator.IsCvsDir ("c:\\temp\\CVSFile")); ! Assert.IsTrue(PathTranslator.IsCvsDir( "C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\sharpcvslib-tests\\sharpcvslib-test-repository\\conf\\CVS\\conf")); Assert.IsTrue(PathTranslator.IsCvsDir( --- 204,213 ---- Assert.IsTrue(PathTranslator.IsCvsDir ("c:\\temp\\cvs")); Assert.IsTrue(PathTranslator.IsCvsDir ("c:\\temp\\cVs")); ! // this is actually valid CDH: 2004/11/01 ! Assert.IsTrue(!PathTranslator.IsCvsDir ("c:\\temp\\cVs\\Crap")); Assert.IsTrue(!PathTranslator.IsCvsDir ("c:\\temp\\testCvs\\")); Assert.IsTrue(!PathTranslator.IsCvsDir ("c:\\temp\\CVSFile")); ! // this is actually valid CDH: 2004/11/01 ! Assert.IsTrue(!PathTranslator.IsCvsDir( "C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\sharpcvslib-tests\\sharpcvslib-test-repository\\conf\\CVS\\conf")); Assert.IsTrue(PathTranslator.IsCvsDir( |