Test weekday parser

This commit is contained in:
Colin Benner 2018-10-01 14:48:16 +02:00
parent 64f72fe743
commit 1f9fda92fb

View file

@ -626,4 +626,12 @@ mod tests {
assert!(res.is_ok());
assert_eq!(parsed.offset, Some(-(1 * 60 + 23) * 60));
}
#[test]
fn test_weekday() {
let date = vec![DateToken::Literal("saturday".into())];
let (res, parsed, _) = parse(date, "weekday");
assert!(res.is_ok());
assert_eq!(parsed.weekday, Some(Weekday::Sat));
}
}