1
0
mirror of https://github.com/bspeice/dtparse synced 2025-07-06 16:24:57 -04:00

Add a test for issue 34

This commit is contained in:
2022-06-15 22:16:15 -04:00
parent 5b3be160f6
commit a193a79afa
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use chrono::NaiveDate;
use std::collections::HashMap;
use std::str;
use parse;
use ParseError;
@ -69,4 +70,12 @@ fn github_33() {
#[test]
fn github_32() {
assert_eq!(parse("99999999999999999999999"), Err(ParseError::InvalidNumeric("99999999999999999999999".to_owned())))
}
#[test]
fn github_34() {
let parse_vec = base64::decode("KTMuLjYpGDYvLjZTNiouNjYuHzZpLjY/NkwuNh42Ry42PzYnKTMuNk02NjY2NjA2NjY2NjY2NjYTNjY2Ni82NjY2NlAuNlAuNlNI").unwrap();
let parse_str = str::from_utf8(&parse_vec).unwrap();
let parse_result = parse(parse_str);
assert!(parse_result.is_err());
}