提交 58f42b00 编写于 作者: O ohair

6910834: TEST: java/io/File/Basic.java fails on Windows CYGWIN environment

Reviewed-by: tbell, alanb
上级 dfe395b0
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册