Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
aa3ca321
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
aa3ca321
编写于
2月 24, 2019
作者:
G
Guillaume Gomez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename rustdoc js test suites
上级
834347dd
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
93 addition
and
100 deletion
+93
-100
src/bootstrap/builder.rs
src/bootstrap/builder.rs
+1
-1
src/bootstrap/test.rs
src/bootstrap/test.rs
+9
-9
src/test/rustdoc-js-not-std/basic.js
src/test/rustdoc-js-not-std/basic.js
+0
-7
src/test/rustdoc-js-std/alias-1.js
src/test/rustdoc-js-std/alias-1.js
+0
-0
src/test/rustdoc-js-std/alias-2.js
src/test/rustdoc-js-std/alias-2.js
+0
-0
src/test/rustdoc-js-std/alias-3.js
src/test/rustdoc-js-std/alias-3.js
+0
-0
src/test/rustdoc-js-std/alias.js
src/test/rustdoc-js-std/alias.js
+0
-0
src/test/rustdoc-js-std/basic.js
src/test/rustdoc-js-std/basic.js
+15
-0
src/test/rustdoc-js-std/deduplication.js
src/test/rustdoc-js-std/deduplication.js
+0
-0
src/test/rustdoc-js-std/enum-option.js
src/test/rustdoc-js-std/enum-option.js
+0
-0
src/test/rustdoc-js-std/filter-crate.js
src/test/rustdoc-js-std/filter-crate.js
+0
-0
src/test/rustdoc-js-std/fn-forget.js
src/test/rustdoc-js-std/fn-forget.js
+0
-0
src/test/rustdoc-js-std/from_u.js
src/test/rustdoc-js-std/from_u.js
+0
-0
src/test/rustdoc-js-std/keyword.js
src/test/rustdoc-js-std/keyword.js
+0
-0
src/test/rustdoc-js-std/macro-check.js
src/test/rustdoc-js-std/macro-check.js
+0
-0
src/test/rustdoc-js-std/macro-print.js
src/test/rustdoc-js-std/macro-print.js
+0
-0
src/test/rustdoc-js-std/multi-query.js
src/test/rustdoc-js-std/multi-query.js
+0
-0
src/test/rustdoc-js-std/never.js
src/test/rustdoc-js-std/never.js
+0
-0
src/test/rustdoc-js-std/quoted.js
src/test/rustdoc-js-std/quoted.js
+0
-0
src/test/rustdoc-js-std/should-fail.js
src/test/rustdoc-js-std/should-fail.js
+0
-0
src/test/rustdoc-js-std/string-from_ut.js
src/test/rustdoc-js-std/string-from_ut.js
+0
-0
src/test/rustdoc-js-std/struct-vec.js
src/test/rustdoc-js-std/struct-vec.js
+0
-0
src/test/rustdoc-js-std/vec-new.js
src/test/rustdoc-js-std/vec-new.js
+0
-0
src/test/rustdoc-js/basic.js
src/test/rustdoc-js/basic.js
+2
-10
src/test/rustdoc-js/basic.rs
src/test/rustdoc-js/basic.rs
+0
-0
src/tools/rustdoc-js-std/tester.js
src/tools/rustdoc-js-std/tester.js
+13
-61
src/tools/rustdoc-js/tester.js
src/tools/rustdoc-js/tester.js
+53
-12
未找到文件。
src/bootstrap/builder.rs
浏览文件 @
aa3ca321
...
...
@@ -405,7 +405,7 @@ fn get_step_descriptions(kind: Kind) -> Vec<StepDescription> {
test
::
Miri
,
test
::
Clippy
,
test
::
CompiletestTest
,
test
::
RustdocJS
,
test
::
RustdocJS
Std
,
test
::
RustdocJSNotStd
,
test
::
RustdocTheme
,
// Run bootstrap close to the end as it's unlikely to fail
...
...
src/bootstrap/test.rs
浏览文件 @
aa3ca321
...
...
@@ -574,22 +574,22 @@ fn run(self, builder: &Builder<'_>) {
}
#[derive(Debug,
Copy,
Clone,
Hash,
PartialEq,
Eq)]
pub
struct
RustdocJS
{
pub
struct
RustdocJS
Std
{
pub
host
:
Interned
<
String
>
,
pub
target
:
Interned
<
String
>
,
}
impl
Step
for
RustdocJS
{
impl
Step
for
RustdocJS
Std
{
type
Output
=
();
const
DEFAULT
:
bool
=
true
;
const
ONLY_HOSTS
:
bool
=
true
;
fn
should_run
(
run
:
ShouldRun
<
'_
>
)
->
ShouldRun
<
'_
>
{
run
.path
(
"src/test/rustdoc-js"
)
run
.path
(
"src/test/rustdoc-js
-std
"
)
}
fn
make_run
(
run
:
RunConfig
<
'_
>
)
{
run
.builder
.ensure
(
RustdocJS
{
run
.builder
.ensure
(
RustdocJS
Std
{
host
:
run
.host
,
target
:
run
.target
,
});
...
...
@@ -598,7 +598,7 @@ fn make_run(run: RunConfig<'_>) {
fn
run
(
self
,
builder
:
&
Builder
<
'_
>
)
{
if
let
Some
(
ref
nodejs
)
=
builder
.config.nodejs
{
let
mut
command
=
Command
::
new
(
nodejs
);
command
.args
(
&
[
"src/tools/rustdoc-js/tester.js"
,
&*
self
.host
]);
command
.args
(
&
[
"src/tools/rustdoc-js
-std
/tester.js"
,
&*
self
.host
]);
builder
.ensure
(
crate
::
doc
::
Std
{
target
:
self
.target
,
stage
:
builder
.top_stage
,
...
...
@@ -606,7 +606,7 @@ fn run(self, builder: &Builder<'_>) {
builder
.run
(
&
mut
command
);
}
else
{
builder
.info
(
"No nodejs found, skipping
\"
src/test/rustdoc-js
\"
tests"
"No nodejs found, skipping
\"
src/test/rustdoc-js
-std
\"
tests"
);
}
}
...
...
@@ -625,7 +625,7 @@ impl Step for RustdocJSNotStd {
const
ONLY_HOSTS
:
bool
=
true
;
fn
should_run
(
run
:
ShouldRun
)
->
ShouldRun
{
run
.path
(
"src/test/rustdoc-js
-not-std
"
)
run
.path
(
"src/test/rustdoc-js"
)
}
fn
make_run
(
run
:
RunConfig
)
{
...
...
@@ -640,7 +640,7 @@ fn make_run(run: RunConfig) {
fn
run
(
self
,
builder
:
&
Builder
)
{
if
let
Some
(
ref
nodejs
)
=
builder
.config.nodejs
{
let
mut
command
=
Command
::
new
(
nodejs
);
command
.args
(
&
[
"src/tools/rustdoc-js
-not-std
/tester.js"
,
command
.args
(
&
[
"src/tools/rustdoc-js/tester.js"
,
&*
self
.host
,
builder
.top_stage
.to_string
()
.as_str
()]);
builder
.ensure
(
crate
::
doc
::
Std
{
...
...
@@ -650,7 +650,7 @@ fn run(self, builder: &Builder) {
builder
.run
(
&
mut
command
);
}
else
{
builder
.info
(
"No nodejs found, skipping
\"
src/test/rustdoc-js
-not-std
\"
tests"
"No nodejs found, skipping
\"
src/test/rustdoc-js
\"
tests"
);
}
}
...
...
src/test/rustdoc-js-not-std/basic.js
已删除
100644 → 0
浏览文件 @
834347dd
const
QUERY
=
'
Fo
'
;
const
EXPECTED
=
{
'
others
'
:
[
{
'
path
'
:
'
basic
'
,
'
name
'
:
'
Foo
'
},
],
};
src/test/rustdoc-js/alias-1.js
→
src/test/rustdoc-js
-std
/alias-1.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/alias-2.js
→
src/test/rustdoc-js
-std
/alias-2.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/alias-3.js
→
src/test/rustdoc-js
-std
/alias-3.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/alias.js
→
src/test/rustdoc-js
-std
/alias.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js-std/basic.js
0 → 100644
浏览文件 @
aa3ca321
const
QUERY
=
'
String
'
;
const
EXPECTED
=
{
'
others
'
:
[
{
'
path
'
:
'
std::string
'
,
'
name
'
:
'
String
'
},
{
'
path
'
:
'
std::ffi
'
,
'
name
'
:
'
CString
'
},
{
'
path
'
:
'
std::ffi
'
,
'
name
'
:
'
OsString
'
},
],
'
in_args
'
:
[
{
'
path
'
:
'
std::str
'
,
'
name
'
:
'
eq
'
},
],
'
returned
'
:
[
{
'
path
'
:
'
std::string::String
'
,
'
name
'
:
'
add
'
},
],
};
src/test/rustdoc-js/deduplication.js
→
src/test/rustdoc-js
-std
/deduplication.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/enum-option.js
→
src/test/rustdoc-js
-std
/enum-option.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/filter-crate.js
→
src/test/rustdoc-js
-std
/filter-crate.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/fn-forget.js
→
src/test/rustdoc-js
-std
/fn-forget.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/from_u.js
→
src/test/rustdoc-js
-std
/from_u.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/keyword.js
→
src/test/rustdoc-js
-std
/keyword.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/macro-check.js
→
src/test/rustdoc-js
-std
/macro-check.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/macro-print.js
→
src/test/rustdoc-js
-std
/macro-print.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/multi-query.js
→
src/test/rustdoc-js
-std
/multi-query.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/never.js
→
src/test/rustdoc-js
-std
/never.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/quoted.js
→
src/test/rustdoc-js
-std
/quoted.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/should-fail.js
→
src/test/rustdoc-js
-std
/should-fail.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/string-from_ut.js
→
src/test/rustdoc-js
-std
/string-from_ut.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/struct-vec.js
→
src/test/rustdoc-js
-std
/struct-vec.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/vec-new.js
→
src/test/rustdoc-js
-std
/vec-new.js
浏览文件 @
aa3ca321
文件已移动
src/test/rustdoc-js/basic.js
浏览文件 @
aa3ca321
const
QUERY
=
'
String
'
;
const
QUERY
=
'
Fo
'
;
const
EXPECTED
=
{
'
others
'
:
[
{
'
path
'
:
'
std::string
'
,
'
name
'
:
'
String
'
},
{
'
path
'
:
'
std::ffi
'
,
'
name
'
:
'
CString
'
},
{
'
path
'
:
'
std::ffi
'
,
'
name
'
:
'
OsString
'
},
],
'
in_args
'
:
[
{
'
path
'
:
'
std::str
'
,
'
name
'
:
'
eq
'
},
],
'
returned
'
:
[
{
'
path
'
:
'
std::string::String
'
,
'
name
'
:
'
add
'
},
{
'
path
'
:
'
basic
'
,
'
name
'
:
'
Foo
'
},
],
};
src/test/rustdoc-js
-not-std
/basic.rs
→
src/test/rustdoc-js/basic.rs
浏览文件 @
aa3ca321
文件已移动
src/tools/rustdoc-js-
not-
std/tester.js
→
src/tools/rustdoc-js-std/tester.js
浏览文件 @
aa3ca321
const
fs
=
require
(
'
fs
'
);
const
{
spawnSync
}
=
require
(
'
child_process
'
);
const
TEST_FOLDER
=
'
src/test/rustdoc-js-
not-
std/
'
;
const
TEST_FOLDER
=
'
src/test/rustdoc-js-std/
'
;
function
getNextStep
(
content
,
pos
,
stop
)
{
while
(
pos
<
content
.
length
&&
content
[
pos
]
!==
stop
&&
...
...
@@ -220,27 +219,17 @@ function lookForEntry(entry, data) {
return
null
;
}
function
remove_docs
(
out_dir
)
{
spawnSync
(
'
rm
'
,
[
'
-rf
'
,
out_dir
]);
}
function
build_docs
(
out_dir
,
rustdoc_path
,
file_to_document
)
{
remove_docs
(
out_dir
);
var
c
=
spawnSync
(
rustdoc_path
,
[
file_to_document
,
'
-o
'
,
out_dir
]);
var
s
=
''
;
if
(
c
.
error
||
c
.
stderr
.
length
>
0
)
{
if
(
c
.
stderr
.
length
>
0
)
{
s
+=
'
==> STDERR:
'
+
c
.
stderr
+
'
\n
'
;
}
s
+=
'
==> ERROR:
'
+
c
.
error
;
function
main
(
argv
)
{
if
(
argv
.
length
!==
3
)
{
console
.
error
(
"
Expected toolchain to check as argument (for example
\
'x86_64-apple-darwin')
"
);
return
1
;
}
return
s
;
}
var
toolchain
=
argv
[
2
];
function
load_files
(
out_folder
,
crate
)
{
var
mainJs
=
readFile
(
out_folder
+
"
/main.js
"
);
var
ALIASES
=
readFile
(
out_folder
+
"
/aliases.js
"
);
var
searchIndex
=
readFile
(
out_folder
+
"
/search-index.js
"
).
split
(
"
\n
"
);
var
mainJs
=
readFile
(
"
build/
"
+
toolchain
+
"
/doc/main.js
"
);
var
ALIASES
=
readFile
(
"
build/
"
+
toolchain
+
"
/doc/aliases.js
"
);
var
searchIndex
=
readFile
(
"
build/
"
+
toolchain
+
"
/doc/search-index.js
"
).
split
(
"
\n
"
);
if
(
searchIndex
[
searchIndex
.
length
-
1
].
length
===
0
)
{
searchIndex
.
pop
();
}
...
...
@@ -259,7 +248,7 @@ function load_files(out_folder, crate) {
var
functionsToLoad
=
[
"
buildHrefAndPath
"
,
"
pathSplitter
"
,
"
levenshtein
"
,
"
validateResult
"
,
"
getQuery
"
,
"
buildIndex
"
,
"
execQuery
"
,
"
execSearch
"
];
finalJS
+=
'
window = { "currentCrate": "
'
+
crate
+
'
" };
\n
'
;
finalJS
+=
'
window = { "currentCrate": "
std
" };
\n
'
;
finalJS
+=
'
var rootPath = "../";
\n
'
;
finalJS
+=
ALIASES
;
finalJS
+=
loadThings
(
arraysToLoad
,
'
array
'
,
extractArrayVariable
,
mainJs
);
...
...
@@ -267,47 +256,11 @@ function load_files(out_folder, crate) {
finalJS
+=
loadThings
(
functionsToLoad
,
'
function
'
,
extractFunction
,
mainJs
);
var
loaded
=
loadContent
(
finalJS
);
return
[
loaded
,
loaded
.
buildIndex
(
searchIndex
.
searchIndex
)];
}
function
main
(
argv
)
{
if
(
argv
.
length
!==
4
)
{
console
.
error
(
"
USAGE: node tester.js [TOOLCHAIN] [STAGE]
"
);
return
1
;
}
const
toolchain
=
argv
[
2
];
const
stage
=
argv
[
3
];
const
rustdoc_path
=
'
./build/
'
+
toolchain
+
'
/stage
'
+
stage
+
'
/bin/rustdoc
'
;
var
index
=
loaded
.
buildIndex
(
searchIndex
.
searchIndex
);
var
errors
=
0
;
fs
.
readdirSync
(
TEST_FOLDER
).
forEach
(
function
(
file
)
{
if
(
!
file
.
endsWith
(
'
.js
'
))
{
return
;
}
var
test_name
=
file
.
substring
(
0
,
file
.
length
-
3
);
process
.
stdout
.
write
(
'
Checking "
'
+
test_name
+
'
" ...
'
);
var
rust_file
=
TEST_FOLDER
+
test_name
+
'
.rs
'
;
if
(
!
fs
.
existsSync
(
rust_file
))
{
console
.
error
(
"
FAILED
"
);
console
.
error
(
"
==> Missing '
"
+
test_name
+
"
.rs' file...
"
);
errors
+=
1
;
return
;
}
var
out_folder
=
"
build/
"
+
toolchain
+
"
/stage
"
+
stage
+
"
/tests/rustdoc-js-not-std/
"
+
test_name
;
var
ret
=
build_docs
(
out_folder
,
rustdoc_path
,
rust_file
);
if
(
ret
.
length
>
0
)
{
console
.
error
(
"
FAILED
"
);
console
.
error
(
ret
);
errors
+=
1
;
return
;
}
var
[
loaded
,
index
]
=
load_files
(
out_folder
,
test_name
);
var
loadedFile
=
loadContent
(
readFile
(
TEST_FOLDER
+
file
)
+
'
exports.QUERY = QUERY;exports.EXPECTED = EXPECTED;
'
);
const
expected
=
loadedFile
.
EXPECTED
;
...
...
@@ -317,6 +270,7 @@ function main(argv) {
const
exact_check
=
loadedFile
.
exact_check
;
const
should_fail
=
loadedFile
.
should_fail
;
var
results
=
loaded
.
execSearch
(
loaded
.
getQuery
(
query
),
index
);
process
.
stdout
.
write
(
'
Checking "
'
+
file
+
'
" ...
'
);
var
error_text
=
[];
for
(
var
key
in
expected
)
{
if
(
!
expected
.
hasOwnProperty
(
key
))
{
...
...
@@ -354,8 +308,6 @@ function main(argv) {
console
.
error
(
"
FAILED
"
);
console
.
error
(
error_text
.
join
(
"
\n
"
));
}
else
{
// In this case, we remove the docs, no need to keep them around.
remove_docs
(
out_folder
);
console
.
log
(
"
OK
"
);
}
});
...
...
src/tools/rustdoc-js/tester.js
浏览文件 @
aa3ca321
const
fs
=
require
(
'
fs
'
);
const
{
spawnSync
}
=
require
(
'
child_process
'
);
const
TEST_FOLDER
=
'
src/test/rustdoc-js/
'
;
...
...
@@ -219,17 +220,22 @@ function lookForEntry(entry, data) {
return
null
;
}
function
main
(
argv
)
{
if
(
argv
.
length
!==
3
)
{
console
.
error
(
"
Expected toolchain to check as argument (for example
\
'x86_64-apple-darwin')
"
);
return
1
;
function
build_docs
(
out_dir
,
rustdoc_path
,
file_to_document
)
{
var
c
=
spawnSync
(
rustdoc_path
,
[
file_to_document
,
'
-o
'
,
out_dir
]);
var
s
=
''
;
if
(
c
.
error
||
c
.
stderr
.
length
>
0
)
{
if
(
c
.
stderr
.
length
>
0
)
{
s
+=
'
==> STDERR:
'
+
c
.
stderr
+
'
\n
'
;
}
s
+=
'
==> ERROR:
'
+
c
.
error
;
}
var
toolchain
=
argv
[
2
];
return
s
;
}
var
mainJs
=
readFile
(
"
build/
"
+
toolchain
+
"
/doc/main.js
"
);
var
ALIASES
=
readFile
(
"
build/
"
+
toolchain
+
"
/doc/aliases.js
"
);
var
searchIndex
=
readFile
(
"
build/
"
+
toolchain
+
"
/doc/search-index.js
"
).
split
(
"
\n
"
);
function
load_files
(
out_folder
,
crate
)
{
var
mainJs
=
readFile
(
out_folder
+
"
/main.js
"
);
var
ALIASES
=
readFile
(
out_folder
+
"
/aliases.js
"
);
var
searchIndex
=
readFile
(
out_folder
+
"
/search-index.js
"
).
split
(
"
\n
"
);
if
(
searchIndex
[
searchIndex
.
length
-
1
].
length
===
0
)
{
searchIndex
.
pop
();
}
...
...
@@ -248,7 +254,7 @@ function main(argv) {
var
functionsToLoad
=
[
"
buildHrefAndPath
"
,
"
pathSplitter
"
,
"
levenshtein
"
,
"
validateResult
"
,
"
getQuery
"
,
"
buildIndex
"
,
"
execQuery
"
,
"
execSearch
"
];
finalJS
+=
'
window = { "currentCrate": "
std
" };
\n
'
;
finalJS
+=
'
window = { "currentCrate": "
'
+
crate
+
'
" };
\n
'
;
finalJS
+=
'
var rootPath = "../";
\n
'
;
finalJS
+=
ALIASES
;
finalJS
+=
loadThings
(
arraysToLoad
,
'
array
'
,
extractArrayVariable
,
mainJs
);
...
...
@@ -256,11 +262,47 @@ function main(argv) {
finalJS
+=
loadThings
(
functionsToLoad
,
'
function
'
,
extractFunction
,
mainJs
);
var
loaded
=
loadContent
(
finalJS
);
var
index
=
loaded
.
buildIndex
(
searchIndex
.
searchIndex
);
return
[
loaded
,
loaded
.
buildIndex
(
searchIndex
.
searchIndex
)];
}
function
main
(
argv
)
{
if
(
argv
.
length
!==
4
)
{
console
.
error
(
"
USAGE: node tester.js [TOOLCHAIN] [STAGE]
"
);
return
1
;
}
const
toolchain
=
argv
[
2
];
const
stage
=
argv
[
3
];
const
rustdoc_path
=
'
./build/
'
+
toolchain
+
'
/stage
'
+
stage
+
'
/bin/rustdoc
'
;
var
errors
=
0
;
fs
.
readdirSync
(
TEST_FOLDER
).
forEach
(
function
(
file
)
{
if
(
!
file
.
endsWith
(
'
.js
'
))
{
return
;
}
var
test_name
=
file
.
substring
(
0
,
file
.
length
-
3
);
process
.
stdout
.
write
(
'
Checking "
'
+
test_name
+
'
" ...
'
);
var
rust_file
=
TEST_FOLDER
+
test_name
+
'
.rs
'
;
if
(
!
fs
.
existsSync
(
rust_file
))
{
console
.
error
(
"
FAILED
"
);
console
.
error
(
"
==> Missing '
"
+
test_name
+
"
.rs' file...
"
);
errors
+=
1
;
return
;
}
var
out_folder
=
"
build/
"
+
toolchain
+
"
/stage
"
+
stage
+
"
/tests/rustdoc-js/
"
+
test_name
;
var
ret
=
build_docs
(
out_folder
,
rustdoc_path
,
rust_file
);
if
(
ret
.
length
>
0
)
{
console
.
error
(
"
FAILED
"
);
console
.
error
(
ret
);
errors
+=
1
;
return
;
}
var
[
loaded
,
index
]
=
load_files
(
out_folder
,
test_name
);
var
loadedFile
=
loadContent
(
readFile
(
TEST_FOLDER
+
file
)
+
'
exports.QUERY = QUERY;exports.EXPECTED = EXPECTED;
'
);
const
expected
=
loadedFile
.
EXPECTED
;
...
...
@@ -270,7 +312,6 @@ function main(argv) {
const
exact_check
=
loadedFile
.
exact_check
;
const
should_fail
=
loadedFile
.
should_fail
;
var
results
=
loaded
.
execSearch
(
loaded
.
getQuery
(
query
),
index
);
process
.
stdout
.
write
(
'
Checking "
'
+
file
+
'
" ...
'
);
var
error_text
=
[];
for
(
var
key
in
expected
)
{
if
(
!
expected
.
hasOwnProperty
(
key
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录