diff options
author | Edwin Cheng <[email protected]> | 2020-03-04 14:29:55 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-03-04 15:41:14 +0000 |
commit | 028595548bea83508c9626835ac84409c83778ed (patch) | |
tree | 09a94c9b8d4b96c960033df710b80b8b667a7098 /crates/ra_mbe/src/tests.rs | |
parent | e76dddd61078e1636ad8dc2ed02d53d37ae987e1 (diff) |
Fix #3436
Diffstat (limited to 'crates/ra_mbe/src/tests.rs')
-rw-r--r-- | crates/ra_mbe/src/tests.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index 1dba82915..5e6a090aa 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs | |||
@@ -825,6 +825,19 @@ fn test_tt_group() { | |||
825 | ) | 825 | ) |
826 | .assert_expand_items(r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#); | 826 | .assert_expand_items(r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#); |
827 | } | 827 | } |
828 | |||
829 | #[test] | ||
830 | fn test_tt_composite() { | ||
831 | parse_macro( | ||
832 | r#" | ||
833 | macro_rules! foo { | ||
834 | ($i:tt) => { 0 } | ||
835 | } | ||
836 | "#, | ||
837 | ) | ||
838 | .assert_expand_items(r#"foo! { => }"#, r#"0"#); | ||
839 | } | ||
840 | |||
828 | #[test] | 841 | #[test] |
829 | fn test_lifetime() { | 842 | fn test_lifetime() { |
830 | parse_macro( | 843 | parse_macro( |