about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-06-21 01:07:05 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-06-21 01:07:05 +1000
commit91362bd22021e15e4f220863e6e3070af6db911e (patch)
tree55116b12dfb778aad0d87660af06d9c70c09eb37
parent82ba030a4fd6a330f83755ae87442e725f103d4e (diff)
downloadrust-91362bd22021e15e4f220863e6e3070af6db911e.tar.gz
rust-91362bd22021e15e4f220863e6e3070af6db911e.zip
extra: Add a testcase for #7256.
-rw-r--r--src/libextra/time.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libextra/time.rs b/src/libextra/time.rs
index 50592d5f730..973aa58921c 100644
--- a/src/libextra/time.rs
+++ b/src/libextra/time.rs
@@ -1138,6 +1138,9 @@ mod tests {
         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() {