mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
Remove TestHeader from non-test builds
This commit is contained in:
@@ -70,7 +70,8 @@ pub enum HeaderDef {
|
|||||||
/// See <https://datatracker.ietf.org/doc/html/rfc8601>
|
/// See <https://datatracker.ietf.org/doc/html/rfc8601>
|
||||||
AuthenticationResults,
|
AuthenticationResults,
|
||||||
|
|
||||||
_TestHeader,
|
#[cfg(test)]
|
||||||
|
TestHeader,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HeaderDef {
|
impl HeaderDef {
|
||||||
@@ -103,7 +104,7 @@ mod tests {
|
|||||||
fn kebab_test() {
|
fn kebab_test() {
|
||||||
assert_eq!(HeaderDef::From_.get_headername(), "from");
|
assert_eq!(HeaderDef::From_.get_headername(), "from");
|
||||||
|
|
||||||
assert_eq!(HeaderDef::_TestHeader.get_headername(), "test-header");
|
assert_eq!(HeaderDef::TestHeader.get_headername(), "test-header");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -2362,7 +2362,7 @@ mod tests {
|
|||||||
assert_eq!(of, "no");
|
assert_eq!(of, "no");
|
||||||
|
|
||||||
// unknown headers do not bubble upwards
|
// unknown headers do not bubble upwards
|
||||||
let of = mimeparser.get_header(HeaderDef::_TestHeader).unwrap();
|
let of = mimeparser.get_header(HeaderDef::TestHeader).unwrap();
|
||||||
assert_eq!(of, "Bar");
|
assert_eq!(of, "Bar");
|
||||||
|
|
||||||
// the following fields would bubble up
|
// the following fields would bubble up
|
||||||
|
|||||||
Reference in New Issue
Block a user