1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 262988 Additional Error Parser Tests for relative paths -- those prepended by '../'

This commit is contained in:
James Blackburn 2009-04-04 11:31:44 +00:00
parent 679552dc61
commit d9addda21a

View file

@ -676,6 +676,23 @@ public class ErrorParserFileMatchingTest extends TestCase {
assertEquals("error",problemMarkerInfo.description);
}
/**
* Checks if a file from error output can be found.
* @throws Exception...
*/
public void testRelativePathUpSubfolderBug262988() throws Exception {
ResourceHelper.createFolder(fProject, "Folder");
ResourceHelper.createFile(fProject, "Folder/testRelativePathUpSubfolder.c");
parseOutput("../Folder/testRelativePathUpSubfolder.c:1:error");
assertEquals(1, errorList.size());
ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
assertEquals("L/FindMatchingFilesTest/Folder/testRelativePathUpSubfolder.c",problemMarkerInfo.file.toString());
assertEquals(1,problemMarkerInfo.lineNumber);
assertEquals("error",problemMarkerInfo.description);
}
/**
* Checks if a file from error output can be found.
* @throws Exception...
@ -814,6 +831,24 @@ public class ErrorParserFileMatchingTest extends TestCase {
assertEquals("error",problemMarkerInfo.description);
}
/**
* Checks if a file from error output can be found.
* @throws Exception...
*/
public void testUppercase2InSubFolder() throws Exception {
// Note that old MSDOS can handle only 8 characters in file name
ResourceHelper.createFolder(fProject, "Folder");
ResourceHelper.createFile(fProject, "Folder/UPCASE2.c");
parseOutput("UpCase2.c:1:error");
assertEquals(1, errorList.size());
ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
assertEquals("L/FindMatchingFilesTest/Folder/UPCASE2.c",problemMarkerInfo.file.toString());
assertEquals(1,problemMarkerInfo.lineNumber);
assertEquals("error",problemMarkerInfo.description);
}
/**
* Checks if a file from error output can be found.
* @throws Exception...