summaryrefslogtreecommitdiffstats
path: root/tests/datetime.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/datetime.rs')
-rw-r--r--tests/datetime.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/datetime.rs b/tests/datetime.rs
index 89a34a1..26b395d 100644
--- a/tests/datetime.rs
+++ b/tests/datetime.rs
@@ -38,6 +38,13 @@ fn make() -> Config {
FileFormat::Hjson,
))
.unwrap()
+ .merge(File::from_str(
+ r#"
+ ini_datetime = 2017-05-10T02:14:53Z
+ "#,
+ FileFormat::Ini,
+ ))
+ .unwrap()
.clone()
}
@@ -64,6 +71,11 @@ fn test_datetime_string() {
let date: String = s.get("hjson_datetime").unwrap();
assert_eq!(&date, "2017-05-10T02:14:53Z");
+
+ // INI
+ let date: String = s.get("ini_datetime").unwrap();
+
+ assert_eq!(&date, "2017-05-10T02:14:53Z");
}
#[test]
@@ -89,4 +101,9 @@ fn test_datetime() {
let date: DateTime<Utc> = s.get("hjson_datetime").unwrap();
assert_eq!(date, Utc.ymd(2017, 5, 10).and_hms(2, 14, 53));
+
+ // INI
+ let date: DateTime<Utc> = s.get("ini_datetime").unwrap();
+
+ assert_eq!(date, Utc.ymd(2017, 5, 10).and_hms(2, 14, 53));
}