@ -37,4 +37,13 @@ mod tests {
fn test_time() {
assert_eq!(Time.execute(&mut BuiltinConfig::new(), vec![]), Ok(()))
}
#[test]
fn test_format_time_rfc2822() {
let time = chrono::Utc.with_ymd_and_hms(6969, 4, 20, 4, 20, 9).unwrap();
assert_eq!(
format_time(time, "RFC2822"),
"Thu, 20 Apr 6969 04:20:09 +0000"
)