diff options
| author | Tom Jakubowski <tom@crystae.net> | 2015-02-05 23:54:11 -0800 |
|---|---|---|
| committer | Tom Jakubowski <tom@crystae.net> | 2015-02-05 23:54:11 -0800 |
| commit | 43b85035682f56a95d3ebbfae4cd6abfed0f3225 (patch) | |
| tree | 82fe6d76acfe9c9703e202877a77e7013b88ad29 | |
| parent | 189930fcae287565dcef856ae8d60a83190a4b92 (diff) | |
| download | rust-43b85035682f56a95d3ebbfae4cd6abfed0f3225.tar.gz rust-43b85035682f56a95d3ebbfae4cd6abfed0f3225.zip | |
rustdoc: Clean up some htmldocck tests
Fix #21740
| -rw-r--r-- | src/test/run-make/rustdoc-hidden-line/foo.rs | 3 | ||||
| -rw-r--r-- | src/test/run-make/rustdoc-negative-impl/foo.rs | 4 | ||||
| -rw-r--r-- | src/test/run-make/rustdoc-where/foo.rs | 25 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/test/run-make/rustdoc-hidden-line/foo.rs b/src/test/run-make/rustdoc-hidden-line/foo.rs index c538a132fb1..3906d9ee8ae 100644 --- a/src/test/run-make/rustdoc-hidden-line/foo.rs +++ b/src/test/run-make/rustdoc-hidden-line/foo.rs @@ -32,5 +32,4 @@ pub fn foo() {} // @!has foo/fn.foo.html invisible -// @matches - //pre '#.*\[.*derive.*\(.*Eq.*\).*\].*//.*Bar' - +// @matches - //pre "#\[derive\(PartialEq\)\] // Bar" diff --git a/src/test/run-make/rustdoc-negative-impl/foo.rs b/src/test/run-make/rustdoc-negative-impl/foo.rs index eaa3af86563..b5fcbf46c5c 100644 --- a/src/test/run-make/rustdoc-negative-impl/foo.rs +++ b/src/test/run-make/rustdoc-negative-impl/foo.rs @@ -15,8 +15,8 @@ pub struct Alpha; // @matches foo/struct.Bravo.html '//pre' "pub struct Bravo<B>" pub struct Bravo<B>; -// @matches foo/struct.Alpha.html '//*[@class="impl"]//code' "impl !.*Send.* for .*Alpha" +// @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>" +// @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-where/foo.rs b/src/test/run-make/rustdoc-where/foo.rs index 9f38ff13805..68fde60564e 100644 --- a/src/test/run-make/rustdoc-where/foo.rs +++ b/src/test/run-make/rustdoc-where/foo.rs @@ -10,29 +10,30 @@ pub trait MyTrait {} -// @matches foo/struct.Alpha.html '//pre' "Alpha.*where.*A:.*MyTrait" +// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A> where A: MyTrait" pub struct Alpha<A> where A: MyTrait; -// @matches foo/trait.Bravo.html '//pre' "Bravo.*where.*B:.*MyTrait" +// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B> where B: MyTrait" pub trait Bravo<B> where B: MyTrait {} -// @matches foo/fn.charlie.html '//pre' "charlie.*where.*C:.*MyTrait" +// @has foo/fn.charlie.html '//pre' "pub fn charlie<C>() where C: MyTrait" pub fn charlie<C>() where C: MyTrait {} pub struct Delta<D>; -// @matches foo/struct.Delta.html '//*[@class="impl"]//code' "impl.*Delta.*where.*D:.*MyTrait" +// @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>; -// @matches foo/struct.Echo.html '//*[@class="impl"]//code' \ -// "impl.*MyTrait.*for.*Echo.*where.*E:.*MyTrait" -// @matches foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \ -// "impl.*MyTrait.*for.*Echo.*where.*E:.*MyTrait" +// @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> {} -// @matches foo/enum.Foxtrot.html '//*[@class="impl"]//code' \ -// "impl.*MyTrait.*for.*Foxtrot.*where.*F:.*MyTrait" -// @matches foo/trait.MyTrait.html '//*[@id="implementors-list"]//code' \ -// "impl.*MyTrait.*for.*Foxtrot.*where.*F:.*MyTrait" +// @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 {} |
