aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2021-01-08 06:00:23 +0000
committerEdwin Cheng <[email protected]>2021-01-08 06:00:23 +0000
commitbced02c5dc636c7b88aeadf9eefa66f8cf06103e (patch)
treecfdfe11e7d4d6b50350679ab6cff67bd64dd90a4 /crates/mbe
parent74a24adc8ecc8bded9d24ccede171da188696122 (diff)
Add test
Diffstat (limited to 'crates/mbe')
-rw-r--r--crates/mbe/src/tests.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs
index 1d9afb4fb..d854985c5 100644
--- a/crates/mbe/src/tests.rs
+++ b/crates/mbe/src/tests.rs
@@ -1080,6 +1080,19 @@ fn test_vertical_bar_with_pat() {
1080} 1080}
1081 1081
1082#[test] 1082#[test]
1083fn test_dollar_crate_lhs_is_not_meta() {
1084 parse_macro(
1085 r#"
1086macro_rules! foo {
1087 ($crate) => {};
1088 () => {0};
1089}
1090 "#,
1091 )
1092 .assert_expand_items(r#"foo!{}"#, r#"0"#);
1093}
1094
1095#[test]
1083fn test_lifetime() { 1096fn test_lifetime() {
1084 parse_macro( 1097 parse_macro(
1085 r#" 1098 r#"