extra: Add a testcase for #7256.

This commit is contained in:
Huon Wilson 2013-06-21 01:07:05 +10:00
parent 82ba030a4f
commit 91362bd220

View File

@ -1138,6 +1138,9 @@ fn test(s: &str, format: &str) -> bool {
assert!(result::unwrap(strptime("-0800", "%z")).tm_gmtoff ==
0);
assert!(test("%", "%%"));
// Test for #7256
assert_eq!(strptime("360", "%Y-%m-%d"), Err(~"Invalid year"))
}
fn test_ctime() {