diff options
| author | bors <bors@rust-lang.org> | 2015-04-10 16:18:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-10 16:18:44 +0000 |
| commit | c897ac04e2ebda378fd9e38f6ec0878ae3a2baf7 (patch) | |
| tree | f26b1f3541943b61937faf150f90b46e9a8f15c5 /src/test/run-make | |
| parent | 9539627ac76ca37d617a329dbd79c50c59cf59ee (diff) | |
| parent | 445faca8441aae34c91318b6ad9e2049885af8dc (diff) | |
Auto merge of #24177 - alexcrichton:rustdoc, r=aturon
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable). I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
Diffstat (limited to 'src/test/run-make')
36 files changed, 0 insertions, 650 deletions
diff --git a/src/test/run-make/issue-22131/foo.rs b/src/test/run-make/issue-22131/foo.rs index 0b1f1291df0..50c63abc0d4 100644 --- a/src/test/run-make/issue-22131/foo.rs +++ b/src/test/run-make/issue-22131/foo.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![crate_name="foo"] - /// ```rust /// assert_eq!(foo::foo(), 1); /// ``` diff --git a/src/test/run-make/rustdoc-assoc-types/Makefile b/src/test/run-make/rustdoc-assoc-types/Makefile deleted file mode 100644 index 74fca83f5f9..00000000000 --- a/src/test/run-make/rustdoc-assoc-types/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk - -all: lib.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc lib.rs - $(HTMLDOCCK) $(TMPDIR)/doc lib.rs diff --git a/src/test/run-make/rustdoc-assoc-types/lib.rs b/src/test/run-make/rustdoc-assoc-types/lib.rs deleted file mode 100644 index 3e6e0ad5600..00000000000 --- a/src/test/run-make/rustdoc-assoc-types/lib.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2015 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_type="lib"] - -// @has lib/trait.Index.html -pub trait Index<I: ?Sized> { - // @has - '//*[@id="associatedtype.Output"]//code' 'type Output: ?Sized' - type Output: ?Sized; - // @has - '//*[@id="tymethod.index"]//code' \ - // "fn index<'a>(&'a self, index: I) -> &'a Self::Output" - fn index<'a>(&'a self, index: I) -> &'a Self::Output; -} diff --git a/src/test/run-make/rustdoc-default-impl/Makefile b/src/test/run-make/rustdoc-default-impl/Makefile deleted file mode 100644 index 338cf9d2053..00000000000 --- a/src/test/run-make/rustdoc-default-impl/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk - -all: foo.rs bar.rs - $(RUSTC) foo.rs --crate-type lib - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc bar.rs -L $(TMPDIR) diff --git a/src/test/run-make/rustdoc-default-impl/bar.rs b/src/test/run-make/rustdoc-default-impl/bar.rs deleted file mode 100644 index 60a2f7202f8..00000000000 --- a/src/test/run-make/rustdoc-default-impl/bar.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 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. - -extern crate foo; - -pub use foo::bar; - -pub fn wut<T: bar::Bar>() { -} diff --git a/src/test/run-make/rustdoc-default-impl/foo.rs b/src/test/run-make/rustdoc-default-impl/foo.rs deleted file mode 100644 index 8f11629be6c..00000000000 --- a/src/test/run-make/rustdoc-default-impl/foo.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2015 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. - -#![feature(optin_builtin_traits)] -#![feature(core)] - -pub mod bar { - use std::marker; - - pub trait Bar: marker::MarkerTrait + 'static {} - - impl Bar for .. {} - - pub trait Foo { - fn foo(&self) {} - } - - impl Foo { - pub fn test<T: Bar>(&self) {} - } - - pub struct TypeId; - - impl TypeId { - pub fn of<T: Bar + ?Sized>() -> TypeId { - panic!() - } - } -} diff --git a/src/test/run-make/rustdoc-extern-default-method/Makefile b/src/test/run-make/rustdoc-extern-default-method/Makefile deleted file mode 100644 index ffc4a08f801..00000000000 --- a/src/test/run-make/rustdoc-extern-default-method/Makefile +++ /dev/null @@ -1,6 +0,0 @@ --include ../tools.mk - -all: lib.rs ext.rs - $(HOST_RPATH_ENV) $(RUSTC) ext.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -L $(TMPDIR) -w html -o $(TMPDIR)/doc lib.rs - $(HTMLDOCCK) $(TMPDIR)/doc lib.rs diff --git a/src/test/run-make/rustdoc-extern-default-method/ext.rs b/src/test/run-make/rustdoc-extern-default-method/ext.rs deleted file mode 100644 index 861562753f9..00000000000 --- a/src/test/run-make/rustdoc-extern-default-method/ext.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 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_type="lib"] - -pub trait Trait { - fn provided(&self) {} -} - -pub struct Struct; - -impl Trait for Struct { - fn provided(&self) {} -} diff --git a/src/test/run-make/rustdoc-extern-default-method/lib.rs b/src/test/run-make/rustdoc-extern-default-method/lib.rs deleted file mode 100644 index df92764dc9a..00000000000 --- a/src/test/run-make/rustdoc-extern-default-method/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 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. - -extern crate ext; - -// @count lib/struct.Struct.html '//*[@id="method.provided"]' 1 -pub use ext::Struct; diff --git a/src/test/run-make/rustdoc-extern-method/Makefile b/src/test/run-make/rustdoc-extern-method/Makefile deleted file mode 100644 index 55cbd2da6ae..00000000000 --- a/src/test/run-make/rustdoc-extern-method/Makefile +++ /dev/null @@ -1,7 +0,0 @@ --include ../tools.mk - -all: foo.rs bar.rs - $(HOST_RPATH_ENV) $(RUSTC) foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -L $(TMPDIR) -w html -o $(TMPDIR)/doc bar.rs - $(HTMLDOCCK) $(TMPDIR)/doc bar.rs diff --git a/src/test/run-make/rustdoc-extern-method/bar.rs b/src/test/run-make/rustdoc-extern-method/bar.rs deleted file mode 100644 index 26a05f8490f..00000000000 --- a/src/test/run-make/rustdoc-extern-method/bar.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 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. - -#![feature(unboxed_closures)] - -extern crate foo; - -// @has bar/trait.Foo.html //pre "pub trait Foo" -// @has - '//*[@id="tymethod.foo"]//code' 'extern "rust-call" fn foo' -// @has - '//*[@id="tymethod.foo_"]//code' 'extern "rust-call" fn foo_' -pub use foo::Foo; - -// @has bar/trait.Bar.html //pre "pub trait Bar" -pub trait Bar { - // @has - '//*[@id="tymethod.bar"]//code' 'extern "rust-call" fn bar' - extern "rust-call" fn bar(&self, _: ()); - // @has - '//*[@id="method.bar_"]//code' 'extern "rust-call" fn bar_' - extern "rust-call" fn bar_(&self, _: ()) { } -} diff --git a/src/test/run-make/rustdoc-extern-method/foo.rs b/src/test/run-make/rustdoc-extern-method/foo.rs deleted file mode 100644 index 96a7a8378b7..00000000000 --- a/src/test/run-make/rustdoc-extern-method/foo.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2015 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_type="lib"] -#![feature(unboxed_closures)] - -pub trait Foo { - extern "rust-call" fn foo(&self, _: ()) -> i32; - extern "rust-call" fn foo_(&self, _: ()) -> i32 { 0 } -} diff --git a/src/test/run-make/rustdoc-ffi/Makefile b/src/test/run-make/rustdoc-ffi/Makefile deleted file mode 100644 index c312efe12f5..00000000000 --- a/src/test/run-make/rustdoc-ffi/Makefile +++ /dev/null @@ -1,8 +0,0 @@ --include ../tools.mk - -all: lib.rs - $(HOST_RPATH_ENV) $(RUSTC) lib.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc lib.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -L $(TMPDIR) -w html -o $(TMPDIR)/doc user.rs - $(HTMLDOCCK) $(TMPDIR)/doc lib.rs - $(HTMLDOCCK) $(TMPDIR)/doc user.rs diff --git a/src/test/run-make/rustdoc-ffi/lib.rs b/src/test/run-make/rustdoc-ffi/lib.rs deleted file mode 100644 index e06dbe76dbb..00000000000 --- a/src/test/run-make/rustdoc-ffi/lib.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 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_type="lib"] - -extern "C" { - // @has lib/fn.foreigner.html //pre 'pub unsafe fn foreigner(cold_as_ice: u32)' - pub fn foreigner(cold_as_ice: u32); -} diff --git a/src/test/run-make/rustdoc-ffi/user.rs b/src/test/run-make/rustdoc-ffi/user.rs deleted file mode 100644 index 09d7a7c536c..00000000000 --- a/src/test/run-make/rustdoc-ffi/user.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 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_type="lib"] - -extern crate lib; - -// @has user/fn.foreigner.html //pre 'pub unsafe fn foreigner(cold_as_ice: u32)' -pub use lib::foreigner; diff --git a/src/test/run-make/rustdoc-hidden-line/Makefile b/src/test/run-make/rustdoc-hidden-line/Makefile deleted file mode 100644 index 3ac7b6d2fae..00000000000 --- a/src/test/run-make/rustdoc-hidden-line/Makefile +++ /dev/null @@ -1,15 +0,0 @@ --include ../tools.mk - -# FIXME ignore windows -ifndef IS_WINDOWS - -all: - @echo $(RUSTDOC) - $(HOST_RPATH_ENV) $(RUSTDOC) --test foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc foo.rs - -else -all: - -endif diff --git a/src/test/run-make/rustdoc-hidden-line/foo.rs b/src/test/run-make/rustdoc-hidden-line/foo.rs deleted file mode 100644 index 3906d9ee8ae..00000000000 --- a/src/test/run-make/rustdoc-hidden-line/foo.rs +++ /dev/null @@ -1,35 +0,0 @@ -// 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="foo"] - -/// The '# ' lines should be removed from the output, but the #[derive] should be -/// retained. -/// -/// ```rust -/// mod to_make_deriving_work { // FIXME #4913 -/// -/// # #[derive(PartialEq)] // invisible -/// # struct Foo; // invisible -/// -/// #[derive(PartialEq)] // Bar -/// struct Bar(Foo); -/// -/// fn test() { -/// let x = Bar(Foo); -/// assert!(x == x); // check that the derivings worked -/// } -/// -/// } -/// ``` -pub fn foo() {} - -// @!has foo/fn.foo.html invisible -// @matches - //pre "#\[derive\(PartialEq\)\] // Bar" diff --git a/src/test/run-make/rustdoc-must-use/Makefile b/src/test/run-make/rustdoc-must-use/Makefile deleted file mode 100644 index 74fca83f5f9..00000000000 --- a/src/test/run-make/rustdoc-must-use/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk - -all: lib.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc lib.rs - $(HTMLDOCCK) $(TMPDIR)/doc lib.rs diff --git a/src/test/run-make/rustdoc-must-use/lib.rs b/src/test/run-make/rustdoc-must-use/lib.rs deleted file mode 100644 index cef79d4536b..00000000000 --- a/src/test/run-make/rustdoc-must-use/lib.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 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_type="lib"] - -// @has lib/struct.Struct.html //pre '#[must_use]' -#[must_use] -pub struct Struct { - field: i32, -} - -// @has lib/enum.Enum.html //pre '#[must_use = "message"]' -#[must_use = "message"] -pub enum Enum { - Variant(i32), -} diff --git a/src/test/run-make/rustdoc-negative-impl/Makefile b/src/test/run-make/rustdoc-negative-impl/Makefile deleted file mode 100644 index c1b1683efdb..00000000000 --- a/src/test/run-make/rustdoc-negative-impl/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk - -all: foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc foo.rs diff --git a/src/test/run-make/rustdoc-negative-impl/foo.rs b/src/test/run-make/rustdoc-negative-impl/foo.rs deleted file mode 100644 index 6c56bcc9be6..00000000000 --- a/src/test/run-make/rustdoc-negative-impl/foo.rs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -#![feature(optin_builtin_traits)] - -// @matches foo/struct.Alpha.html '//pre' "pub struct Alpha" -pub struct Alpha; -// @matches foo/struct.Bravo.html '//pre' "pub struct Bravo<B>" -pub struct Bravo<B>(B); - -// @matches foo/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha" -impl !Send for Alpha {} - -// @matches foo/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>" -impl<B> !Send for Bravo<B> {} diff --git a/src/test/run-make/rustdoc-recursion/Makefile b/src/test/run-make/rustdoc-recursion/Makefile deleted file mode 100644 index ba971836e5a..00000000000 --- a/src/test/run-make/rustdoc-recursion/Makefile +++ /dev/null @@ -1,11 +0,0 @@ --include ../tools.mk - -# FIXME ignore windows -ifndef IS_WINDOWS -all: - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo2.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo3.rs -else -all: -endif diff --git a/src/test/run-make/rustdoc-recursion/foo.rs b/src/test/run-make/rustdoc-recursion/foo.rs deleted file mode 100644 index 7505d20566d..00000000000 --- a/src/test/run-make/rustdoc-recursion/foo.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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_type = "lib"] -#![feature(globs)] - -mod m { - pub use self::a::Foo; - - mod a { - pub struct Foo; - } - - mod b { - pub use super::*; - } -} diff --git a/src/test/run-make/rustdoc-recursion/foo2.rs b/src/test/run-make/rustdoc-recursion/foo2.rs deleted file mode 100644 index 7505d20566d..00000000000 --- a/src/test/run-make/rustdoc-recursion/foo2.rs +++ /dev/null @@ -1,24 +0,0 @@ -// 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_type = "lib"] -#![feature(globs)] - -mod m { - pub use self::a::Foo; - - mod a { - pub struct Foo; - } - - mod b { - pub use super::*; - } -} diff --git a/src/test/run-make/rustdoc-recursion/foo3.rs b/src/test/run-make/rustdoc-recursion/foo3.rs deleted file mode 100644 index 62a13f76ca4..00000000000 --- a/src/test/run-make/rustdoc-recursion/foo3.rs +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -#![feature(globs)] - -pub mod longhands { - pub use super::*; - - pub use super::common_types::computed::compute_CSSColor as to_computed_value; - - pub fn computed_as_specified() {} -} - -pub mod common_types { - pub mod computed { - pub use super::super::longhands::computed_as_specified as compute_CSSColor; - } -} diff --git a/src/test/run-make/rustdoc-search-index/Makefile b/src/test/run-make/rustdoc-search-index/Makefile deleted file mode 100644 index e7e8f0c35a7..00000000000 --- a/src/test/run-make/rustdoc-search-index/Makefile +++ /dev/null @@ -1,15 +0,0 @@ --include ../tools.mk - -# FIXME ignore windows -ifndef IS_WINDOWS - -source=index.rs - -all: - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc $(source) - $(HTMLDOCCK) $(TMPDIR)/doc $(source) - -else -all: - -endif diff --git a/src/test/run-make/rustdoc-search-index/index.rs b/src/test/run-make/rustdoc-search-index/index.rs deleted file mode 100644 index 42469a21f22..00000000000 --- a/src/test/run-make/rustdoc-search-index/index.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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"] - -// @has search-index.js Foo -pub use private::Foo; - -mod private { - pub struct Foo; - impl Foo { - pub fn test_method() {} // @has - test_method - fn priv_method() {} // @!has - priv_method - } - - pub trait PrivateTrait { - fn trait_method(&self) {} // @!has - priv_method - } -} diff --git a/src/test/run-make/rustdoc-smoke/Makefile b/src/test/run-make/rustdoc-smoke/Makefile deleted file mode 100644 index 7a1ad761b3d..00000000000 --- a/src/test/run-make/rustdoc-smoke/Makefile +++ /dev/null @@ -1,4 +0,0 @@ --include ../tools.mk -all: - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc foo.rs diff --git a/src/test/run-make/rustdoc-smoke/foo.rs b/src/test/run-make/rustdoc-smoke/foo.rs deleted file mode 100644 index 494eb03d728..00000000000 --- a/src/test/run-make/rustdoc-smoke/foo.rs +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -// @has foo/index.html -#![crate_name = "foo"] - -//! Very docs - -// @has foo/bar/index.html -pub mod bar { - - /// So correct - // @has foo/bar/baz/index.html - pub mod baz { - /// Much detail - // @has foo/bar/baz/fn.baz.html - pub fn baz() { } - } - - /// *wow* - // @has foo/bar/trait.Doge.html - pub trait Doge { fn dummy(&self) { } } - - // @has foo/bar/struct.Foo.html - pub struct Foo { x: isize, y: usize } - - // @has foo/bar/fn.prawns.html - pub fn prawns((a, b): (isize, usize), Foo { x, y }: Foo) { } -} diff --git a/src/test/run-make/rustdoc-src-links/Makefile b/src/test/run-make/rustdoc-src-links/Makefile deleted file mode 100644 index 419603e82f7..00000000000 --- a/src/test/run-make/rustdoc-src-links/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk -all: - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc qux/mod.rs diff --git a/src/test/run-make/rustdoc-src-links/foo.rs b/src/test/run-make/rustdoc-src-links/foo.rs deleted file mode 100644 index 9a964f11252..00000000000 --- a/src/test/run-make/rustdoc-src-links/foo.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015 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 = "foo"] - -//! Dox -// @has src/foo/foo.rs.html -// @has foo/index.html '//a/@href' '../src/foo/foo.rs.html' - -pub mod qux; - -// @has foo/bar/index.html '//a/@href' '../../src/foo/foo.rs.html' -pub mod bar { - - /// Dox - // @has foo/bar/baz/index.html '//a/@href' '../../../src/foo/foo.rs.html' - pub mod baz { - /// Dox - // @has foo/bar/baz/fn.baz.html '//a/@href' '../../../src/foo/foo.rs.html' - pub fn baz() { } - } - - /// Dox - // @has foo/bar/trait.Foobar.html '//a/@href' '../../src/foo/foo.rs.html' - pub trait Foobar { fn dummy(&self) { } } - - // @has foo/bar/struct.Foo.html '//a/@href' '../../src/foo/foo.rs.html' - pub struct Foo { x: i32, y: u32 } - - // @has foo/bar/fn.prawns.html '//a/@href' '../../src/foo/foo.rs.html' - pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { } -} - -/// Dox -// @has foo/fn.modfn.html '//a/@href' '../src/foo/foo.rs.html' -pub fn modfn() { } diff --git a/src/test/run-make/rustdoc-src-links/qux/mod.rs b/src/test/run-make/rustdoc-src-links/qux/mod.rs deleted file mode 100644 index 9b1563d32ac..00000000000 --- a/src/test/run-make/rustdoc-src-links/qux/mod.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015 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. - -//! Dox -// @has src/foo/qux/mod.rs.html -// @has foo/qux/index.html '//a/@href' '../../src/foo/qux/mod.rs.html' - -// @has foo/qux/bar/index.html '//a/@href' '../../../src/foo/qux/mod.rs.html' -pub mod bar { - - /// Dox - // @has foo/qux/bar/baz/index.html '//a/@href' '../../../../src/foo/qux/mod.rs.html' - pub mod baz { - /// Dox - // @has foo/qux/bar/baz/fn.baz.html '//a/@href' '../../../../src/foo/qux/mod.rs.html' - pub fn baz() { } - } - - /// Dox - // @has foo/qux/bar/trait.Foobar.html '//a/@href' '../../../src/foo/qux/mod.rs.html' - pub trait Foobar { fn dummy(&self) { } } - - // @has foo/qux/bar/struct.Foo.html '//a/@href' '../../../src/foo/qux/mod.rs.html' - pub struct Foo { x: i32, y: u32 } - - // @has foo/qux/bar/fn.prawns.html '//a/@href' '../../../src/foo/qux/mod.rs.html' - pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { } -} - -/// Dox -// @has foo/qux/fn.modfn.html '//a/@href' '../../src/foo/qux/mod.rs.html' -pub fn modfn() { } diff --git a/src/test/run-make/rustdoc-viewpath-self/Makefile b/src/test/run-make/rustdoc-viewpath-self/Makefile deleted file mode 100644 index c1b1683efdb..00000000000 --- a/src/test/run-make/rustdoc-viewpath-self/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk - -all: foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc foo.rs diff --git a/src/test/run-make/rustdoc-viewpath-self/foo.rs b/src/test/run-make/rustdoc-viewpath-self/foo.rs deleted file mode 100644 index 6fd47d84c30..00000000000 --- a/src/test/run-make/rustdoc-viewpath-self/foo.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 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. - -pub mod io { - pub trait Reader { fn dummy(&self) { } } -} - -pub enum Maybe<A> { - Just(A), - Nothing -} - -// @has foo/prelude/index.html -pub mod prelude { - // @has foo/prelude/index.html '//code' 'pub use io::{self, Reader}' - #[doc(no_inline)] pub use io::{self, Reader}; - // @has foo/prelude/index.html '//code' 'pub use Maybe::{self, Just, Nothing}' - #[doc(no_inline)] pub use Maybe::{self, Just, Nothing}; -} diff --git a/src/test/run-make/rustdoc-where/Makefile b/src/test/run-make/rustdoc-where/Makefile deleted file mode 100644 index c1b1683efdb..00000000000 --- a/src/test/run-make/rustdoc-where/Makefile +++ /dev/null @@ -1,5 +0,0 @@ --include ../tools.mk - -all: foo.rs - $(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs - $(HTMLDOCCK) $(TMPDIR)/doc foo.rs diff --git a/src/test/run-make/rustdoc-where/foo.rs b/src/test/run-make/rustdoc-where/foo.rs deleted file mode 100644 index 91a7e1c9fd4..00000000000 --- a/src/test/run-make/rustdoc-where/foo.rs +++ /dev/null @@ -1,42 +0,0 @@ -// 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. - -pub trait MyTrait { fn dummy(&self) { } } - -// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A> where A: MyTrait" -pub struct Alpha<A>(A) where A: MyTrait; -// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B> where B: MyTrait" -pub trait Bravo<B> where B: MyTrait { fn get(&self, B: B); } -// @has foo/fn.charlie.html '//pre' "pub fn charlie<C>() where C: MyTrait" -pub fn charlie<C>() where C: MyTrait {} - -pub struct Delta<D>(D); - -// @has foo/struct.Delta.html '//*[@class="impl"]//code' \ -// "impl<D> Delta<D> where D: MyTrait" -impl<D> Delta<D> where D: MyTrait { - pub fn delta() {} -} - -pub struct Echo<E>(E); - -// @has foo/struct.Echo.html '//*[@class="impl"]//code' \ -// "impl<E> MyTrait for Echo<E> where E: MyTrait" -// @has foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \ -// "impl<E> MyTrait for Echo<E> where E: MyTrait" -impl<E> MyTrait for Echo<E> where E: MyTrait {} - -pub enum Foxtrot<F> { Foxtrot1(F) } - -// @has foo/enum.Foxtrot.html '//*[@class="impl"]//code' \ -// "impl<F> MyTrait for Foxtrot<F> where F: MyTrait" -// @has foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \ -// "impl<F> MyTrait for Foxtrot<F> where F: MyTrait" -impl<F> MyTrait for Foxtrot<F> where F: MyTrait {} |
