|
Lines 2914-2921
Link Here
|
| 2914 |
+ " -1.5 -g -preserveAllLocals" |
2914 |
+ " -1.5 -g -preserveAllLocals" |
| 2915 |
+ " -d \"" + OUTPUT_DIR + File.separator + "X.java\"", |
2915 |
+ " -d \"" + OUTPUT_DIR + File.separator + "X.java\"", |
| 2916 |
"", |
2916 |
"", |
| 2917 |
"No .class file created for file X.class in ---OUTPUT_DIR_PLACEHOLDER---/X.java because of an IOException: The output directory is a file : ---OUTPUT_DIR_PLACEHOLDER---/X.java\n", |
2917 |
"No .class file created for file X.class in ---OUTPUT_DIR_PLACEHOLDER" + |
| 2918 |
true); |
2918 |
"---/X.java because of an IOException: Regular file " + |
|
|
2919 |
"---OUTPUT_DIR_PLACEHOLDER---/X.java cannot be used " + |
| 2920 |
"as output directory\n", |
| 2921 |
true); |
| 2922 |
} |
| 2923 |
// suggested by https://bugs.eclipse.org/bugs/show_bug.cgi?id=141522 |
| 2924 |
// only checking messages (the bug itself involves concurrent access to |
| 2925 |
// the file system and a true test case would call for instrumented |
| 2926 |
// code) |
| 2927 |
public void test054(){ |
| 2928 |
this.runConformTest( |
| 2929 |
new String[] { |
| 2930 |
"X.java", |
| 2931 |
"public class X {}", |
| 2932 |
"f", // create simple file f |
| 2933 |
"" |
| 2934 |
}, |
| 2935 |
"\"" + OUTPUT_DIR + File.separator + "X.java\"" |
| 2936 |
+ " -1.5 -g -preserveAllLocals" |
| 2937 |
+ " -d \"" + OUTPUT_DIR + "/f/out\"", |
| 2938 |
"", |
| 2939 |
"No .class file created for file X.class in ---OUTPUT_DIR_PLACEHOLDER" + |
| 2940 |
"---/f/out because of an IOException: " + |
| 2941 |
"Could not create output directory ---OUTPUT_DIR_PLACEHOLDER---/f/out\n", |
| 2942 |
true); |
| 2943 |
} |
| 2944 |
// suggested by https://bugs.eclipse.org/bugs/show_bug.cgi?id=141522 |
| 2945 |
// only checking messages (the bug itself involves concurrent access to |
| 2946 |
// the file system and a true test case would call for instrumented |
| 2947 |
// code) |
| 2948 |
// this test only works on appropriate file systems |
| 2949 |
public void test055(){ |
| 2950 |
if (File.separatorChar == '/') { |
| 2951 |
String tentativeOutputDirNameTail = |
| 2952 |
File.separator + "out"; |
| 2953 |
File outputDirectory = new File(OUTPUT_DIR + tentativeOutputDirNameTail); |
| 2954 |
outputDirectory.mkdirs(); |
| 2955 |
outputDirectory.setReadOnly(); |
| 2956 |
// read-only directories do not prevent file creation |
| 2957 |
// on under-gifted file systems |
| 2958 |
this.runConformTest( |
| 2959 |
new String[] { |
| 2960 |
"p/X.java", |
| 2961 |
"package p;\n" + |
| 2962 |
"public class X {}", |
| 2963 |
}, |
| 2964 |
"\"" + OUTPUT_DIR + File.separator + "p/X.java\"" |
| 2965 |
+ " -1.5 -g -preserveAllLocals" |
| 2966 |
+ " -d \"" + OUTPUT_DIR + "/out\"", |
| 2967 |
"", |
| 2968 |
"No .class file created for file p/X.class in " + |
| 2969 |
"---OUTPUT_DIR_PLACEHOLDER---/out because of " + |
| 2970 |
"an IOException: Could not create subdirectory p into output directory " + |
| 2971 |
"---OUTPUT_DIR_PLACEHOLDER---/out\n", |
| 2972 |
false /* do not flush output directory */); |
| 2973 |
} |
| 2974 |
} |
| 2975 |
// suggested by https://bugs.eclipse.org/bugs/show_bug.cgi?id=141522 |
| 2976 |
// only checking messages (the bug itself involves concurrent access to |
| 2977 |
// the file system and a true test case would call for instrumented |
| 2978 |
// code) |
| 2979 |
public void test056(){ |
| 2980 |
String tentativeOutputDirNameTail = |
| 2981 |
File.separator + "out"; |
| 2982 |
this.runConformTest( |
| 2983 |
new String[] { |
| 2984 |
"p/X.java", |
| 2985 |
"package p;\n" + |
| 2986 |
"public class X {}", |
| 2987 |
"out/p", // create simple file out/p |
| 2988 |
"" |
| 2989 |
}, |
| 2990 |
"\"" + OUTPUT_DIR + File.separator + "p/X.java\"" |
| 2991 |
+ " -1.5 -g -preserveAllLocals" |
| 2992 |
+ " -d \"" + OUTPUT_DIR + tentativeOutputDirNameTail + "\"", |
| 2993 |
"", |
| 2994 |
"No .class file created for file p/X.class in " + |
| 2995 |
"---OUTPUT_DIR_PLACEHOLDER---/out" + |
| 2996 |
" because of an IOException: Regular file ---OUTPUT_DIR_PLACEHOLDER---" + |
| 2997 |
"/out/p cannot be used as output directory\n", |
| 2998 |
true); |
| 2919 |
} |
2999 |
} |
| 2920 |
public static Class testClass() { |
3000 |
public static Class testClass() { |
| 2921 |
return BatchCompilerTest.class; |
3001 |
return BatchCompilerTest.class; |