Lines 32-38
Link Here
|
32 |
public static Test suite() { |
32 |
public static Test suite() { |
33 |
if (false) { |
33 |
if (false) { |
34 |
TestSuite suite = new TestSuite(); |
34 |
TestSuite suite = new TestSuite(); |
35 |
suite.addTest(new BatchCompilerTest("test032")); |
35 |
suite.addTest(new BatchCompilerTest("test035")); |
36 |
return suite; |
36 |
return suite; |
37 |
} |
37 |
} |
38 |
if (false) { |
38 |
if (false) { |
Lines 2002-2007
Link Here
|
2002 |
"", |
2002 |
"", |
2003 |
true); |
2003 |
true); |
2004 |
} |
2004 |
} |
|
|
2005 |
// check classpath value |
2006 |
public void test035(){ |
2007 |
final String javaClassspath = System.getProperty("java.class.path"); |
2008 |
final String javaUserDir = System.getProperty("user.dir"); |
2009 |
try { |
2010 |
System.setProperty("user.dir", OUTPUT_DIR); |
2011 |
this.runConformTest( |
2012 |
new String[] { |
2013 |
"p/Y.java", |
2014 |
"public class Y { public static final String S = \"\"; }", |
2015 |
}, |
2016 |
"\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "Y.java\"" |
2017 |
+ " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", |
2018 |
"", |
2019 |
"", |
2020 |
true); |
2021 |
System.setProperty("java.class.path", ""); |
2022 |
this.runConformTest( |
2023 |
new String[] { |
2024 |
"X.java", |
2025 |
"import p.Y;\n" + |
2026 |
"public class X {\n" + |
2027 |
" public static void main(String[] args) {\n" + |
2028 |
" System.out.print(Y.S);\n" + |
2029 |
" }\n" + |
2030 |
"}", |
2031 |
}, |
2032 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
2033 |
+ " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", |
2034 |
"",// this is not the runtime output |
2035 |
"no classpath defined, using default directory instead\n", |
2036 |
false); |
2037 |
final String userDir = System.getProperty("user.dir"); |
2038 |
File f = new File(userDir, "X.java"); |
2039 |
if (!f.delete()) { |
2040 |
System.out.println("Could not delete X"); |
2041 |
} |
2042 |
f = new File(userDir, "p" + File.separator + "Y.java"); |
2043 |
if (!f.delete()) { |
2044 |
System.out.println("Could not delete Y"); |
2045 |
} |
2046 |
|
2047 |
} finally { |
2048 |
System.setProperty("java.class.path", javaClassspath); |
2049 |
System.setProperty("user.dir", javaUserDir); |
2050 |
} |
2051 |
} |
2005 |
public static Class testClass() { |
2052 |
public static Class testClass() { |
2006 |
return BatchCompilerTest.class; |
2053 |
return BatchCompilerTest.class; |
2007 |
} |
2054 |
} |