Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
61677c05
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
61677c05
编写于
5月 31, 2013
作者:
D
dxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8015628: Test Failure in closed/java/io/pathNames/GeneralSolaris.java
Reviewed-by: alanb
上级
05f7a90e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
15 deletion
+11
-15
test/java/io/pathNames/General.java
test/java/io/pathNames/General.java
+2
-5
test/java/io/pathNames/GeneralWin32.java
test/java/io/pathNames/GeneralWin32.java
+9
-10
未找到文件。
test/java/io/pathNames/General.java
浏览文件 @
61677c05
...
...
@@ -277,8 +277,8 @@ public class General {
{
check
(
ans
,
ask
+
slash
);
checkNames
(
depth
,
create
,
ans
,
ask
);
ans
.
endsWith
(
File
.
separator
)
?
ans
:
ans
+
File
.
separator
,
ask
+
slash
);
}
...
...
@@ -308,9 +308,6 @@ public class General {
String
ans
,
String
ask
)
throws
Exception
{
ans
=
ans
.
endsWith
(
File
.
separator
)
?
ans
:
ans
+
File
.
separator
;
ask
=
ask
.
endsWith
(
File
.
separator
)
?
ask
:
ask
+
File
.
separator
;
int
d
=
depth
-
1
;
File
f
=
new
File
(
ans
);
String
n
;
...
...
test/java/io/pathNames/GeneralWin32.java
浏览文件 @
61677c05
...
...
@@ -50,13 +50,13 @@ public class GeneralWin32 extends General {
private
static
final
int
DEPTH
=
2
;
private
static
String
baseDir
=
null
;
private
static
String
userDir
=
null
;
private
static
String
relative
=
null
;
/* Pathnames relative to working directory */
private
static
void
checkCaseLookup
()
throws
IOException
{
/* Use long names here to avoid 8.3 format, which Samba servers often
force to lowercase */
String
relative
=
baseDir
.
substring
(
userDir
.
length
()
+
1
);
File
d1
=
new
File
(
relative
,
"XyZzY0123"
);
File
d2
=
new
File
(
d1
,
"FOO_bar_BAZ"
);
File
f
=
new
File
(
d2
,
"GLORPified"
);
...
...
@@ -79,9 +79,9 @@ public class GeneralWin32 extends General {
case of filenames, rather than just using the input case */
File
y
=
new
File
(
userDir
,
f
.
getPath
());
String
ans
=
y
.
getPath
();
check
(
ans
,
relative
+
"
\\"
+
"
XyZzY0123\\FOO_bar_BAZ\\GLORPified"
);
check
(
ans
,
relative
+
"
\\"
+
"
xyzzy0123\\foo_bar_baz\\glorpified"
);
check
(
ans
,
relative
+
"
\\"
+
"
XYZZY0123\\FOO_BAR_BAZ\\GLORPIFIED"
);
check
(
ans
,
relative
+
"XyZzY0123\\FOO_bar_BAZ\\GLORPified"
);
check
(
ans
,
relative
+
"xyzzy0123\\foo_bar_baz\\glorpified"
);
check
(
ans
,
relative
+
"XYZZY0123\\FOO_BAR_BAZ\\GLORPIFIED"
);
}
private
static
void
checkWild
(
File
f
)
throws
Exception
{
...
...
@@ -103,8 +103,7 @@ public class GeneralWin32 extends General {
private
static
void
checkRelativePaths
()
throws
Exception
{
checkCaseLookup
();
checkWildCards
();
String
relative
=
baseDir
.
substring
(
userDir
.
length
()
+
1
);
checkNames
(
3
,
true
,
baseDir
.
toString
(),
relative
);
checkNames
(
3
,
true
,
baseDir
,
relative
);
}
...
...
@@ -136,7 +135,6 @@ public class GeneralWin32 extends General {
String
ans
=
exists
?
df
.
getAbsolutePath
()
:
d
;
if
(!
ans
.
endsWith
(
"\\"
))
ans
=
ans
+
"\\"
;
String
relative
=
baseDir
.
substring
(
userDir
.
length
()
+
1
);
checkNames
(
depth
,
false
,
ans
+
relative
,
d
+
relative
);
}
...
...
@@ -171,15 +169,16 @@ public class GeneralWin32 extends General {
return
;
}
if
(
args
.
length
>
0
)
debug
=
true
;
userDir
=
System
.
getProperty
(
"user.dir"
);
baseDir
=
initTestData
(
6
);
userDir
=
System
.
getProperty
(
"user.dir"
)
+
'\\'
;
baseDir
=
initTestData
(
6
)
+
'\\'
;
relative
=
baseDir
.
substring
(
userDir
.
length
());
checkRelativePaths
();
checkDrivePaths
();
checkUncPaths
();
}
private
static
String
initTestData
(
int
maxDepth
)
throws
IOException
{
File
parent
=
new
File
(
System
.
getProperty
(
"user.dir"
)
);
File
parent
=
new
File
(
userDir
);
String
baseDir
=
null
;
maxDepth
=
maxDepth
<
DEPTH
+
2
?
DEPTH
+
2
:
maxDepth
;
for
(
int
i
=
0
;
i
<
maxDepth
;
i
++)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录