test(headers): Add tests for headers with "*" value

This commit is contained in:
Pyfisch
2015-04-26 14:06:46 +02:00
parent efd6c96a3c
commit 18f717fcf1
4 changed files with 34 additions and 19 deletions

View File

@@ -176,7 +176,6 @@ macro_rules! header {
self.fmt_header(f)
}
}
#[allow(unused_imports)]
mod $tm{
use $crate::header::*;
@@ -211,7 +210,7 @@ macro_rules! header {
}
};
// List header, one or more items with "*" option
($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+}) => {
($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+} $tm:ident{$($tf:item)*}) => {
$(#[$a])*
#[derive(Clone, Debug, PartialEq)]
pub enum $id {
@@ -250,6 +249,13 @@ macro_rules! header {
self.fmt_header(f)
}
}
#[allow(unused_imports)]
mod $tm{
use $crate::header::*;
use $crate::mime::*;
use super::$id as HeaderField;
$($tf)*
}
};
}