tests: improve test reliability for parsing dates

Summary:
We have seen issues parsing '0' as date somehow passes on OSX, and parsing
'Apr 2018' fails on Windows with GitBash. Let's workaround the tests while
I'm going to find better fixes.

Reviewed By: xavierd

Differential Revision: D19353054

fbshipit-source-id: c0302071964191b97eea6572ffd985f831db6791
This commit is contained in:
Jun Wu 2020-01-10 15:44:12 -08:00 committed by Facebook Github Bot
parent 9310643aae
commit 6266e2cad6
2 changed files with 6 additions and 1 deletions

View File

@ -327,8 +327,13 @@ Test parsing extra forms
start: -2208988800 (Mon Jan 01 00:00:00 1900 +0000)
end: 978336000 (Mon Jan 01 00:00:00 2001 -0800)
#if no-windows
(Windows parsing are affected by System Local settings that are unclear how to
override in tests. Cannot assume English here.)
Test parsing months
$ for i in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
> hg log -d "$i 2018" -r null
> done
#endif

View File

@ -43,7 +43,7 @@ parsed = dispatch._parseconfig(
"lists.list18=\n \n\nding\ndong",
"date.epoch=0 0",
"date.birth=2005-04-19T00:00:00",
"date.invalid=0",
"date.invalid=invalid",
],
)