hh:mm tests!
@@ -253,6 +253,21 @@ mod tests {
assert_eq!(3660, offset_seconds_from_fixed_offset("+0061"));
}
+ #[test]
+ fn from_str_hh_colon_mm() {
+ assert_eq!(0, offset_seconds_from_fixed_offset("+00:00"));
+ assert_eq!(0, offset_seconds_from_fixed_offset("-00:00"));
+ assert_eq!(60, offset_seconds_from_fixed_offset("+00:01"));
+ assert_eq!(-60, offset_seconds_from_fixed_offset("-00:01"));
+ assert_eq!(3600, offset_seconds_from_fixed_offset("+01:00"));
+ assert_eq!(-3600, offset_seconds_from_fixed_offset("-01:00"));
+ assert_eq!(7320, offset_seconds_from_fixed_offset("+02:02"));
+ assert_eq!(-7320, offset_seconds_from_fixed_offset("-02:02"));
+ assert_eq!(362_340, offset_seconds_from_fixed_offset("+99:99"));
+ assert_eq!(-362_340, offset_seconds_from_fixed_offset("-99:99"));
+ assert_eq!(3660, offset_seconds_from_fixed_offset("+00:61"));
+ }
+
#[test]
fn from_str_hh_mm_strange() {
assert_eq!(3660, offset_seconds_from_fixed_offset("+0061"));
