Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2012-05-29 17:36:32 -0400
committerAndrew Gvozdev2012-05-29 17:41:40 -0400
commit1bcae4bb9b9eec6b98252a64464115c00028f423 (patch)
tree1852654d82851cb1cdbbe637c05aa0fe7c3bca30 /core/org.eclipse.cdt.core.tests
parentfe5f6d43f25753ca501173901ddc30eb2f6faa51 (diff)
downloadorg.eclipse.cdt-1bcae4bb9b9eec6b98252a64464115c00028f423.tar.gz
org.eclipse.cdt-1bcae4bb9b9eec6b98252a64464115c00028f423.tar.xz
org.eclipse.cdt-1bcae4bb9b9eec6b98252a64464115c00028f423.zip
bug 380956: The CDT GCC Build Output Parser should not require 'make's recursion depth indicators
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
index 0f7b4c8699..d5475bdd7b 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
@@ -1206,6 +1206,36 @@ public class ErrorParserFileMatchingTest extends TestCase {
}
/**
+ * Checks if output of '-n'/'--just-print' or '-w'/'--print-directory' options of make can be recognized.
+ *
+ * @throws Exception...
+ */
+ public void testPushPop_WithNoLevel() throws Exception {
+ String fileName = getName() + ".c";
+
+ ResourceHelper.createFolder(fProject, "Folder");
+ ResourceHelper.createFolder(fProject, "Folder/SubFolder");
+
+ ResourceHelper.createFile(fProject, fileName);
+ ResourceHelper.createFile(fProject, "Folder/"+fileName);
+ ResourceHelper.createFile(fProject, "Folder/SubFolder/"+fileName);
+
+ String lines = "make: Entering directory `Folder'\n"
+ + "make: Entering directory `SubFolder'\n"
+ + "make: Leaving directory `SubFolder'\n"
+ + fileName+":1:error\n";
+
+ String[] errorParsers = {CWD_LOCATOR_ID, mockErrorParserId };
+ parseOutput(fProject, fProject.getLocation(), errorParsers, lines);
+ assertEquals(1, errorList.size());
+
+ ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+ assertEquals("L/FindMatchingFilesTest/Folder/"+fileName,problemMarkerInfo.file.toString());
+ assertEquals(1,problemMarkerInfo.lineNumber);
+ assertEquals("error",problemMarkerInfo.description);
+ }
+
+ /**
* Checks if a file from error output can be found.
*
* @throws Exception...

Back to the top