Skip to content

Commit

Permalink
Add tests/issues.rs, test Issue chronotope#1096
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmoon79 committed May 28, 2023
1 parent 656c941 commit 5b157ab
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/issues.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// issues.rs
//
// Regressions tests of specific issues.

#[cfg(test)]
use chrono::NaiveDateTime;

#[test]
#[should_panic]
/// When Issue #1096 is fixed then `#[should_panic]` should be removed.
/// See https://github.com/chronotope/chrono/issues/1096
fn issue_1096() {
let test = NaiveDateTime::from_timestamp_millis(0).unwrap();
let tf = test.format("%+");
let output = tf.to_string();
assert_eq!(output, "1970-01-01T00:00:00.00000+00:00");
}

0 comments on commit 5b157ab

Please sign in to comment.