re-enable parser
This commit is contained in:
parent
f7972f8fa5
commit
14bcf119a7
3 changed files with 4 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
Date: 7 Mar 2023 08:00:00 +0200
|
||||||
From: someone@example.com
|
From: someone@example.com
|
||||||
To: someone_else@example.com
|
To: someone_else@example.com
|
||||||
Subject: An RFC 822 formatted message
|
Subject: An RFC 822 formatted message
|
||||||
|
|
|
@ -65,7 +65,6 @@ fn received_tokens(input: &str) -> IResult<&str, &str> {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use chrono::{FixedOffset, TimeZone};
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_received_body() {
|
fn test_received_body() {
|
||||||
|
|
|
@ -24,8 +24,8 @@ fn main() {
|
||||||
parser(&rawmail[..], |section| {
|
parser(&rawmail[..], |section| {
|
||||||
// Checks/debug
|
// Checks/debug
|
||||||
println!("{:?}", section);
|
println!("{:?}", section);
|
||||||
//assert!(hdrs.date.is_some());
|
assert!(section.date.is_some());
|
||||||
//assert!(hdrs.from.len() > 0);
|
assert!(section.from.len() > 0);
|
||||||
//assert!(hdrs.bad_fields.len() == 0);
|
assert!(section.bad_fields.len() == 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue