diff options
Diffstat (limited to 'crates/ra_mbe/src/tests.rs')
-rw-r--r-- | crates/ra_mbe/src/tests.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index bd5a44240..c487bbbd4 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs | |||
@@ -868,6 +868,31 @@ fn test_meta() { | |||
868 | } | 868 | } |
869 | 869 | ||
870 | #[test] | 870 | #[test] |
871 | fn test_meta_doc_comments() { | ||
872 | let rules = create_rules( | ||
873 | r#" | ||
874 | macro_rules! foo { | ||
875 | ($(#[$ i:meta])+) => ( | ||
876 | $(#[$ i])+ | ||
877 | fn bar() {} | ||
878 | ) | ||
879 | } | ||
880 | "#, | ||
881 | ); | ||
882 | assert_expansion( | ||
883 | MacroKind::Items, | ||
884 | &rules, | ||
885 | r#"foo! { | ||
886 | /// Single Line Doc 1 | ||
887 | /** | ||
888 | MultiLines Doc | ||
889 | */ | ||
890 | }"#, | ||
891 | "# [doc = \" Single Line Doc 1\"] # [doc = \" \\\\n MultiLines Doc\\\\n \"] fn bar () {}", | ||
892 | ); | ||
893 | } | ||
894 | |||
895 | #[test] | ||
871 | fn test_tt_block() { | 896 | fn test_tt_block() { |
872 | let rules = create_rules( | 897 | let rules = create_rules( |
873 | r#" | 898 | r#" |