mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 13:44:15 +00:00
Test weekday parser
This commit is contained in:
parent
64f72fe743
commit
1f9fda92fb
1 changed files with 8 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue