1
0
mirror of https://github.com/bspeice/dtparse synced 2024-12-22 04:18:09 -05:00

Add a test for issue 34

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

View File

@ -20,3 +20,6 @@ chrono = "0.4"
lazy_static = "1.1"
num-traits = "0.2"
rust_decimal = { version = "1.17.0", default-features = false }
[dev-dependencies]
base64 = "0.13"

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());
}