Assert.IsTrue(project.Build("1"), id + "1 : Error in building");
string [] files = new string [] { "xyz.cs", "rel/bar.resx", "rel/qwe.txt"};
- string [] assignedFiles = new string [] { "Test/Link/xyz.cs", "Test/Link/bar.resx", "../Test/Link/qwe.txt"};
+ string [] assignedFiles = new string [] {
+ PathCombine ("Test", "Link", "xyz.cs"),
+ PathCombine ("Test", "Link", "bar.resx"),
+ PathCombine ("..", "Test", "Link", "qwe.txt")
+ };
BuildItemGroup include = project.GetEvaluatedItemsByName("FooPath");
Assert.AreEqual(files.Length, include.Count, id + "2");
}
}
+ string PathCombine (string path1, params string[] parts)
+ {
+ if (parts == null || parts.Length == 0)
+ return path1;
+
+ string final_path = path1;
+ foreach (string part in parts)
+ final_path = Path.Combine (final_path, part);
+
+ return final_path;
+ }
+
void CheckTargetPath(string[] files, string[] assignedFiles, string rootFolder, string id)
{
Engine engine = new Engine(Consts.BinPath);