Fix tests failing on Windows

This commit is contained in:
Tiffany Bennett 2020-07-18 00:08:18 -07:00
parent 657c545085
commit fff99d6a2a
2 changed files with 16 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/target/
/web/rink-web.toml
.idea

View file

@ -531,16 +531,31 @@ fn test_missing_base() {
}
#[test]
#[cfg(not(windows))]
fn test_date_difference() {
test_starts_with("now - (now - 3days)", "2 day, 23 hour, 59 minute, 59.99");
}
#[test]
#[cfg(windows)]
fn test_date_difference() {
test_starts_with("now - (now - 3days)", "3 day, 0 second (time)");
}
#[test]
#[cfg(not(windows))]
fn test_date_time_formats() {
test_starts_with("#1970-01-01 10:30 GMT#", "1970-01-01 10:30:00 GMT");
test_starts_with("(now-#10:30#) - (now-#11:30#)", "59 minute, 59.99");
}
#[test]
#[cfg(windows)]
fn test_date_time_formats() {
test_starts_with("#1970-01-01 10:30 GMT#", "1970-01-01 10:30:00 GMT");
test_starts_with("(now-#10:30#) - (now-#11:30#)", "1 hour, 0 second (time)");
}
#[test]
fn test_no_calls_on_rhs() {
test(