Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a simple test for rustdoc search index contents
- Loading branch information
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-include ../tools.mk | ||
|
||
# FIXME ignore windows | ||
ifndef IS_WINDOWS | ||
|
||
source=index.rs | ||
|
||
all: | ||
$(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc $(source) | ||
cp $(source) $(TMPDIR) | ||
cp verify.sh $(TMPDIR) | ||
$(call RUN,verify.sh) $(TMPDIR) | ||
|
||
else | ||
all: | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
#![crate_name = "rustdoc_test"] | ||
|
||
// In: Foo | ||
pub use private::Foo; | ||
|
||
mod private { | ||
pub struct Foo; | ||
impl Foo { | ||
// In: test_method | ||
pub fn test_method() {} | ||
// Out: priv_method | ||
fn priv_method() {} | ||
} | ||
|
||
pub trait PrivateTrait { | ||
// Out: priv_method | ||
fn trait_method() {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
source="$1/index.rs" | ||
index="$1/doc/search-index.js" | ||
|
||
if ! [ -e $index ] | ||
then | ||
echo "Could not find the search index (looked for $index)" | ||
exit 1 | ||
fi | ||
|
||
ins=$(grep -o 'In: .*' $source | sed 's/In: \(.*\)/\1/g') | ||
outs=$(grep -o 'Out: .*' $source | sed 's/Out: \(.*\)/\1/g') | ||
|
||
for p in $ins | ||
do | ||
if ! grep -q $p $index | ||
then | ||
echo "'$p' was erroneously excluded from search index." | ||
exit 1 | ||
fi | ||
done | ||
|
||
for p in $outs | ||
do | ||
if grep -q $p $index | ||
then | ||
echo "'$p' was erroneously included in search index." | ||
exit 1 | ||
fi | ||
done | ||
|
||
exit 0 |
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from cmr
at SiegeLord@0db6f4c
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging SiegeLord/rust/reexported_methods = 0db6f4c into auto
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SiegeLord/rust/reexported_methods = 0db6f4c merged ok, testing candidate = da9da328
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No active merge of candidate 0db6f4c found, likely manual push to master
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging SiegeLord/rust/reexported_methods = 0db6f4c into auto
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SiegeLord/rust/reexported_methods = 0db6f4c merged ok, testing candidate = e1a3a205
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1038
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/1042
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1042
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1042
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1037
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1038
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1037
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1043
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1037
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1040
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1039
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No active merge of candidate 0db6f4c found, likely manual push to master
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging SiegeLord/rust/reexported_methods = 0db6f4c into auto
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SiegeLord/rust/reexported_methods = 0db6f4c merged ok, testing candidate = 6deeb80a
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1042
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1044
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1043
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1044
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1039
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1040
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1039
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1045
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1040
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1039
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1042
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1041
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No active merge of candidate 0db6f4c found, likely manual push to master
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging SiegeLord/rust/reexported_methods = 0db6f4c into auto
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SiegeLord/rust/reexported_methods = 0db6f4c merged ok, testing candidate = 51d0d06
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/1066
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1066
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1065
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1066
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1061
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1062
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1061
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1067
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1062
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1061
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1064
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1065
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1063
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1064
0db6f4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 51d0d06