From 7d3d835c58e789127744076c97110664ea9c6087 Mon Sep 17 00:00:00 2001 From: Philip Munksgaard Date: Thu, 4 Oct 2018 22:17:01 +0200 Subject: replace escape-rust-expr test with dont-show-const-contents The old test was supposed to check for proper html escaping when showing the contents of constants. This was changed as part of #53409. The revised test asserts that the contents of the constant is not shown as part of the generated documentation. --- src/test/rustdoc/dont-show-const-contents.rs | 15 +++++++++++++++ src/test/rustdoc/escape-rust-expr.rs | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 src/test/rustdoc/dont-show-const-contents.rs delete mode 100644 src/test/rustdoc/escape-rust-expr.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/dont-show-const-contents.rs b/src/test/rustdoc/dont-show-const-contents.rs new file mode 100644 index 00000000000..1392c62b4ab --- /dev/null +++ b/src/test/rustdoc/dont-show-const-contents.rs @@ -0,0 +1,15 @@ +// Copyright 2016 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Test that the contents of constants are not displayed as part of the +// documentation. + +// @!has dont_show_const_contents/constant.CONST_S.html 'dont show this' +pub const CONST_S: &'static str = "dont show this"; diff --git a/src/test/rustdoc/escape-rust-expr.rs b/src/test/rustdoc/escape-rust-expr.rs deleted file mode 100644 index 4594eb95ea1..00000000000 --- a/src/test/rustdoc/escape-rust-expr.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2016 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Test that we HTML-escape Rust expressions, where HTML special chars -// can occur, and we know it's definitely not markup. - -// @!has escape_rust_expr/constant.CONST_S.html '//pre[@class="rust const"]' '"