6910834: TEST: java/io/File/Basic.java fails on Windows CYGWIN environment
Reviewed-by: tbell, alanb
This commit is contained in:
parent
56ac52238f
commit
23ac573ae7
@ -75,7 +75,7 @@ public class Basic {
|
||||
if (!f.canRead()) fail(f, "is not readable");
|
||||
if (f.canWrite() != writeable)
|
||||
fail(f, writeable ? "is not writeable" : "is writeable");
|
||||
int rwLen = (File.separatorChar == '/' ? 6 : 7);
|
||||
int rwLen = 6;
|
||||
if (f.length() != length) fail(f, "has wrong length");
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ public class Basic {
|
||||
if (nonExistantFile.exists()) fail(nonExistantFile, "exists");
|
||||
|
||||
show(rwFile);
|
||||
testFile(rwFile, true, File.separatorChar == '/' ? 6 : 7);
|
||||
testFile(rwFile, true, 6);
|
||||
rwFile.delete();
|
||||
if (rwFile.exists())
|
||||
fail(rwFile, "could not delete");
|
||||
|
@ -32,10 +32,10 @@ fi
|
||||
|
||||
rm -rf x.Basic.*
|
||||
rm -f x.Basic.non
|
||||
echo xyzzy > x.Basic.rw
|
||||
printf "%s" "xyzzyN" > x.Basic.rw
|
||||
touch x.Basic.ro; chmod ugo-w x.Basic.ro
|
||||
mkdir x.Basic.dir
|
||||
if $TESTJAVA/bin/java $* -classpath $TESTCLASSES Basic; then
|
||||
if $TESTJAVA/bin/java $* -classpath "$TESTCLASSES" Basic; then
|
||||
[ -f x.Basic.rw ] && (echo "x.Basic.rw not deleted"; exit 1)
|
||||
([ -d x.Basic.dir ] || [ \! -d x.Basic.dir2 ]) \
|
||||
&& (echo "x.Basic.dir not renamed"; exit 1)
|
||||
|
Loading…
Reference in New Issue
Block a user