Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 27568 Details for
Bug 110849
[compiler] Batch compiler doesn't use the user.dir if no classpath is specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_classpath_tests.txt (text/plain), 2.50 KB, created by
Olivier Thomann
on 2005-09-27 14:06:04 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-09-27 14:06:04 EDT
Size:
2.50 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.24 >diff -u -r1.24 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 22 Aug 2005 17:47:49 -0000 1.24 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 27 Sep 2005 18:05:47 -0000 >@@ -32,7 +32,7 @@ > public static Test suite() { > if (false) { > TestSuite suite = new TestSuite(); >- suite.addTest(new BatchCompilerTest("test032")); >+ suite.addTest(new BatchCompilerTest("test035")); > return suite; > } > if (false) { >@@ -2002,6 +2002,53 @@ > "", > true); > } >+// check classpath value >+public void test035(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "p/Y.java", >+ "public class Y { public static final String S = \"\"; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "import p.Y;\n" + >+ "public class X {\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(Y.S);\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!f.delete()) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!f.delete()) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} > public static Class testClass() { > return BatchCompilerTest.class; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 110849
:
27567
| 27568