diff options
author | mkersten <mkersten> | 2003-08-07 08:10:01 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-08-07 08:10:01 +0000 |
commit | acdf688ccc4d8b376141b2c8e28bc5d7b7612e90 (patch) | |
tree | 45af0dc8461e8cb89504bb9bc43fa911c16df1f5 /org.aspectj.ajdt.core | |
parent | 7b6fd547894bfbfbebc0c679be931a235a468512 (diff) | |
download | aspectj-acdf688ccc4d8b376141b2c8e28bc5d7b7612e90.tar.gz aspectj-acdf688ccc4d8b376141b2c8e28bc5d7b7612e90.zip |
Fixed
- 40257: parsing of "../" paths in LST files is broken
Added interactive test for checking compiler task list messages (via browser).
Diffstat (limited to 'org.aspectj.ajdt.core')
6 files changed, 39 insertions, 13 deletions
diff --git a/org.aspectj.ajdt.core/testdata/bug-40257/d1/A.java b/org.aspectj.ajdt.core/testdata/bug-40257/d1/A.java new file mode 100644 index 000000000..d5fbbefd3 --- /dev/null +++ b/org.aspectj.ajdt.core/testdata/bug-40257/d1/A.java @@ -0,0 +1,6 @@ + +package d1; + +public class A { + +} diff --git a/org.aspectj.ajdt.core/testdata/bug-40257/d1/d2/B.java b/org.aspectj.ajdt.core/testdata/bug-40257/d1/d2/B.java new file mode 100644 index 000000000..d419b8fd5 --- /dev/null +++ b/org.aspectj.ajdt.core/testdata/bug-40257/d1/d2/B.java @@ -0,0 +1,3 @@ +package d1.d2; + +class B { }
\ No newline at end of file diff --git a/org.aspectj.ajdt.core/testdata/bug-40257/d1/test.lst b/org.aspectj.ajdt.core/testdata/bug-40257/d1/test.lst new file mode 100644 index 000000000..2091b5b30 --- /dev/null +++ b/org.aspectj.ajdt.core/testdata/bug-40257/d1/test.lst @@ -0,0 +1,3 @@ +A.java +d2/B.java +../d3/C.java diff --git a/org.aspectj.ajdt.core/testdata/bug-40257/d3/C.java b/org.aspectj.ajdt.core/testdata/bug-40257/d3/C.java new file mode 100644 index 000000000..6729096d4 --- /dev/null +++ b/org.aspectj.ajdt.core/testdata/bug-40257/d3/C.java @@ -0,0 +1,3 @@ +package d3; + +class C { }
\ No newline at end of file diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtAjcTests.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtAjcTests.java index ef1612750..777eec89a 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtAjcTests.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtAjcTests.java @@ -25,7 +25,7 @@ public class AjdtAjcTests extends TestCase { suite.addTestSuite(BuildArgParserTestCase.class); suite.addTestSuite(ConsoleMessageHandlerTestCase.class); //$JUnit-END$ - return suite; + return suite; } public AjdtAjcTests(String name) { super(name); } diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/BuildArgParserTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/BuildArgParserTestCase.java index a340565a6..7ce74846a 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/BuildArgParserTestCase.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/BuildArgParserTestCase.java @@ -12,23 +12,17 @@ package org.aspectj.ajdt.ajc; -import org.aspectj.ajdt.internal.core.builder.AjBuildConfig; -import org.aspectj.ajdt.internal.core.builder.AjCompilerOptions; +import java.io.*; +import java.util.*; + +import junit.framework.TestCase; + +import org.aspectj.ajdt.internal.core.builder.*; import org.aspectj.bridge.MessageWriter; import org.aspectj.testing.util.TestUtil; import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import junit.framework.TestCase; - /** * Some black-box test is happening here. */ @@ -328,6 +322,23 @@ public class BuildArgParserTestCase extends TestCase { assertEquals(outputDir.getPath(), OUT_PATH); } + public void testNonExistentConfigFile() throws IOException { + String FILE_PATH = "@" + TEST_DIR + "../bug-40257/d1/test.lst"; + AjBuildConfig config = parser.genBuildConfig(new String[] { FILE_PATH }, messageWriter); + + String a = new File(TEST_DIR + "../bug-40257/d1/A.java").getCanonicalPath(); + String b = new File(TEST_DIR + "../bug-40257/d1/d2/B.java").getCanonicalPath(); + String c = new File(TEST_DIR + "../bug-40257/d3/C.java").getCanonicalPath(); + List pathList = new ArrayList(); + for (Iterator it = config.getFiles().iterator(); it.hasNext(); ) { + pathList.add(((File)it.next()).getCanonicalPath()); + } + assertTrue(pathList.contains(a)); + assertTrue(pathList.contains(b)); + assertTrue(pathList.contains(c)); + + } + public void testXlint() throws InvalidInputException { AjdtCommand command = new AjdtCommand(); AjBuildConfig config = parser.genBuildConfig(new String[] {"-Xlint"}, messageWriter); |