mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
bug 263977: Test case fixed for Unix systems.
This commit is contained in:
parent
8e855d931c
commit
af2ec51c4d
1 changed files with 14 additions and 3 deletions
|
@ -1286,17 +1286,28 @@ public class ErrorParserFileMatchingTest extends TestCase {
|
|||
* @throws Exception...
|
||||
*/
|
||||
public void testWindowsPathOnLinux_Bug263977() throws Exception {
|
||||
// This test is valid on Unix platforms only
|
||||
boolean isUnix = Platform.getOS().equals(Platform.OS_LINUX)
|
||||
|| Platform.getOS().equals(Platform.OS_AIX)
|
||||
|| Platform.getOS().equals(Platform.OS_SOLARIS)
|
||||
|| Platform.getOS().equals(Platform.OS_HPUX)
|
||||
|| Platform.getOS().equals(Platform.OS_QNX)
|
||||
|| Platform.getOS().equals(Platform.OS_MACOSX);
|
||||
if (!isUnix) {
|
||||
return;
|
||||
}
|
||||
|
||||
String fileName = "testWindowsPathOnLinux_Bug263977.c";
|
||||
|
||||
ResourceHelper.createFolder(fProject, "Folder/Subfolder");
|
||||
ResourceHelper.createFile(fProject, "Folder/Subfolder/"+fileName);
|
||||
ResourceHelper.createFolder(fProject, "w:/Folder/Subfolder");
|
||||
ResourceHelper.createFile(fProject, "w:/Folder/Subfolder/"+fileName);
|
||||
|
||||
// Note that main intention of this test is to run on *Linux*, see bug 263977
|
||||
parseOutput("W:\\Folder\\Subfolder\\"+fileName+":1:error");
|
||||
assertEquals(1, errorList.size());
|
||||
|
||||
ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
|
||||
assertEquals("L/FindMatchingFilesTest/Folder/Subfolder/"+fileName,problemMarkerInfo.file.toString());
|
||||
assertEquals("L/FindMatchingFilesTest/w:/Folder/Subfolder/"+fileName,problemMarkerInfo.file.toString());
|
||||
assertEquals("error",problemMarkerInfo.description);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue