mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 21:16:50 +00:00
add test for macro expand formatting
This commit is contained in:
parent
ebf8b1a96e
commit
e34ae760f0
@ -237,6 +237,24 @@ fn main() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn macro_expand_underscore() {
|
||||
check(
|
||||
r#"
|
||||
macro_rules! bar {
|
||||
($i:tt) => { for _ in 0..$i {} }
|
||||
}
|
||||
fn main() {
|
||||
ba$0r!(42);
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
bar
|
||||
for _ in 0..42{}
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn macro_expand_recursive_expansion() {
|
||||
check(
|
||||
|
Loading…
Reference in New Issue
Block a user