Add some tests I forgot about earlier

This commit is contained in:
Nick Cameron 2018-08-01 10:41:16 +12:00
parent 4be12fa5d6
commit 9c34986bab
8 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,7 @@
// rustfmt-format_macro_bodies: false
macro_rules! foo {
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}

View file

@ -0,0 +1,7 @@
// rustfmt-format_macro_bodies: true
macro_rules! foo {
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}

View file

@ -0,0 +1,7 @@
// rustfmt-format_macro_matchers: false
macro_rules! foo {
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}

View file

@ -0,0 +1,6 @@
// rustfmt-format_macro_matchers: true
macro_rules! foo {
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}

View file

@ -0,0 +1,6 @@
// rustfmt-format_macro_bodies: false
macro_rules! foo {
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}

View file

@ -0,0 +1,10 @@
// rustfmt-format_macro_bodies: true
macro_rules! foo {
($a: ident : $b: ty) => {
$a(42): $b;
};
($a: ident $b: ident $c: ident) => {
$a = $b + $c;
};
}

View file

@ -0,0 +1,10 @@
// rustfmt-format_macro_matchers: false
macro_rules! foo {
($a: ident : $b: ty) => {
$a(42): $b;
};
($a: ident $b: ident $c: ident) => {
$a = $b + $c;
};
}

View file

@ -0,0 +1,10 @@
// rustfmt-format_macro_matchers: true
macro_rules! foo {
($a:ident : $b:ty) => {
$a(42): $b;
};
($a:ident $b:ident $c:ident) => {
$a = $b + $c;
};
}