about summary refs log tree commit diff
path: root/src/test/rustdoc/static-root-path.rs
diff options
context:
space:
mode:
authorQuietMisdreavus <grey@quietmisdreavus.net>2018-12-20 10:18:45 -0600
committerQuietMisdreavus <grey@quietmisdreavus.net>2018-12-20 10:18:45 -0600
commit0b0a00cc0551b7f525515e4e53bc0a11bd1b2ebd (patch)
tree762b7100621f8a197a04b3f8ec9f03ef7c80a6c4 /src/test/rustdoc/static-root-path.rs
parent0a4a4ffc69f2d05eb8b8a32eaf9bd0607b69fe38 (diff)
downloadrust-0b0a00cc0551b7f525515e4e53bc0a11bd1b2ebd.tar.gz
rust-0b0a00cc0551b7f525515e4e53bc0a11bd1b2ebd.zip
new --static-root-path flag for controlling static file locations
Diffstat (limited to 'src/test/rustdoc/static-root-path.rs')
-rw-r--r--src/test/rustdoc/static-root-path.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/rustdoc/static-root-path.rs b/src/test/rustdoc/static-root-path.rs
new file mode 100644
index 00000000000..9307b501585
--- /dev/null
+++ b/src/test/rustdoc/static-root-path.rs
@@ -0,0 +1,18 @@
+// Copyright 2018 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.
+
+// compile-flags:-Z unstable-options --static-root-path /cache/
+
+// @has static_root_path/struct.SomeStruct.html
+// @matches - '"/cache/main\.js"'
+// @!matches - '"\.\./main\.js"'
+// @matches - '"\.\./search-index\.js"'
+// @!matches - '"/cache/search-index\.js"'
+pub struct SomeStruct;