lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Svensson <si...@devhost.se>
Subject Why the use of Utils.Paths in TestBackwardsCompability?
Date Sun, 29 Jul 2012 08:56:02 GMT
I'm looking into running the tests in MonoDevelop (Mono 2.10.9) on a 
Mac, debugging one failure at a time. The TestBackwardsCompability tests 
fails when unzipping because the paths for the source zip files are 
incorrectly calculated. It originates in Paths.AssemblyDirectory, where 
it returns a rooted path on Windows ("C:\Users\sisve\..."), but a 
relative path on Mac ("Users/sisve/...").

We could use the existing Path.Combine, and choose to copy to 
input.xxx.zip files to the output directory. This would remove  the need 
for the Paths class completely [if I understand it correctly]. (It's 
also used from LuceneTestCase to initialize a variable no-one uses.)

Old: System.String dirName = 
Paths.CombinePath(Paths.ProjectRootDirectory, "test/core/index/index." + 
oldNames[i]);
New: System.String dirName = Path.Combine("Index", "index." + oldNames[i]);

But this makes me wondering, why was the Paths class introduced at all?

// Simon

Mime
View raw message