diff options
| author | bors <bors@rust-lang.org> | 2016-02-03 00:58:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-03 00:58:37 +0000 |
| commit | a9922419cf84a12b2b9c69f8b261cdd7c287c1a5 (patch) | |
| tree | 892a71c2d529580445b468a47d1b627ee5b8fbca /src/test | |
| parent | dea183aa8461e8520b08864ec81ad2985be36d34 (diff) | |
| parent | 1a21dabf27232c5c9281a6bf7a8b83afb3efa201 (diff) | |
| download | rust-a9922419cf84a12b2b9c69f8b261cdd7c287c1a5.tar.gz rust-a9922419cf84a12b2b9c69f8b261cdd7c287c1a5.zip | |
Auto merge of #31370 - Manishearth:rollup, r=Manishearth
- Successful merges: #27499, #31220, #31329, #31332, #31347, #31351, #31352, #31366 - Failed merges:
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/macro-doc-raw-str-hashes.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/run-pass/macro-doc-raw-str-hashes.rs b/src/test/run-pass/macro-doc-raw-str-hashes.rs new file mode 100644 index 00000000000..ffbe237b74e --- /dev/null +++ b/src/test/run-pass/macro-doc-raw-str-hashes.rs @@ -0,0 +1,39 @@ +// 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. + +// The number of `#`s used to wrap the documentation comment should differ regarding the content. +// +// Related issue: #27489 + +macro_rules! homura { + ($x:expr, #[$y:meta]) => (assert_eq!($x, stringify!($y))) +} + +fn main() { + homura! { + r#"doc = r" Madoka""#, + /// Madoka + }; + + homura! { + r##"doc = r#" One quote mark: ["]"#"##, + /// One quote mark: ["] + }; + + homura! { + r##"doc = r#" Two quote marks: [""]"#"##, + /// Two quote marks: [""] + }; + + homura! { + r#####"doc = r####" Raw string ending sequences: ["###]"####"#####, + /// Raw string ending sequences: ["###] + }; +} |
