Skip to content

Commit aa3ca32

Browse files
Rename rustdoc js test suites
1 parent 834347d commit aa3ca32

27 files changed

+93
-100
lines changed

src/bootstrap/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl<'a> Builder<'a> {
405405
test::Miri,
406406
test::Clippy,
407407
test::CompiletestTest,
408-
test::RustdocJS,
408+
test::RustdocJSStd,
409409
test::RustdocJSNotStd,
410410
test::RustdocTheme,
411411
// Run bootstrap close to the end as it's unlikely to fail

src/bootstrap/test.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -574,22 +574,22 @@ impl Step for RustdocTheme {
574574
}
575575

576576
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
577-
pub struct RustdocJS {
577+
pub struct RustdocJSStd {
578578
pub host: Interned<String>,
579579
pub target: Interned<String>,
580580
}
581581

582-
impl Step for RustdocJS {
582+
impl Step for RustdocJSStd {
583583
type Output = ();
584584
const DEFAULT: bool = true;
585585
const ONLY_HOSTS: bool = true;
586586

587587
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
588-
run.path("src/test/rustdoc-js")
588+
run.path("src/test/rustdoc-js-std")
589589
}
590590

591591
fn make_run(run: RunConfig<'_>) {
592-
run.builder.ensure(RustdocJS {
592+
run.builder.ensure(RustdocJSStd {
593593
host: run.host,
594594
target: run.target,
595595
});
@@ -598,15 +598,15 @@ impl Step for RustdocJS {
598598
fn run(self, builder: &Builder<'_>) {
599599
if let Some(ref nodejs) = builder.config.nodejs {
600600
let mut command = Command::new(nodejs);
601-
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
601+
command.args(&["src/tools/rustdoc-js-std/tester.js", &*self.host]);
602602
builder.ensure(crate::doc::Std {
603603
target: self.target,
604604
stage: builder.top_stage,
605605
});
606606
builder.run(&mut command);
607607
} else {
608608
builder.info(
609-
"No nodejs found, skipping \"src/test/rustdoc-js\" tests"
609+
"No nodejs found, skipping \"src/test/rustdoc-js-std\" tests"
610610
);
611611
}
612612
}
@@ -625,7 +625,7 @@ impl Step for RustdocJSNotStd {
625625
const ONLY_HOSTS: bool = true;
626626

627627
fn should_run(run: ShouldRun) -> ShouldRun {
628-
run.path("src/test/rustdoc-js-not-std")
628+
run.path("src/test/rustdoc-js")
629629
}
630630

631631
fn make_run(run: RunConfig) {
@@ -640,7 +640,7 @@ impl Step for RustdocJSNotStd {
640640
fn run(self, builder: &Builder) {
641641
if let Some(ref nodejs) = builder.config.nodejs {
642642
let mut command = Command::new(nodejs);
643-
command.args(&["src/tools/rustdoc-js-not-std/tester.js",
643+
command.args(&["src/tools/rustdoc-js/tester.js",
644644
&*self.host,
645645
builder.top_stage.to_string().as_str()]);
646646
builder.ensure(crate::doc::Std {
@@ -650,7 +650,7 @@ impl Step for RustdocJSNotStd {
650650
builder.run(&mut command);
651651
} else {
652652
builder.info(
653-
"No nodejs found, skipping \"src/test/rustdoc-js-not-std\" tests"
653+
"No nodejs found, skipping \"src/test/rustdoc-js\" tests"
654654
);
655655
}
656656
}

src/test/rustdoc-js-not-std/basic.js

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/test/rustdoc-js-std/basic.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const QUERY = 'String';
2+
3+
const EXPECTED = {
4+
'others': [
5+
{ 'path': 'std::string', 'name': 'String' },
6+
{ 'path': 'std::ffi', 'name': 'CString' },
7+
{ 'path': 'std::ffi', 'name': 'OsString' },
8+
],
9+
'in_args': [
10+
{ 'path': 'std::str', 'name': 'eq' },
11+
],
12+
'returned': [
13+
{ 'path': 'std::string::String', 'name': 'add' },
14+
],
15+
};

0 commit comments

Comments
 (0)