blob: dc7ff33c520952f4cfc14d4eaf3d36c99bd096df [file] [log] [blame]
Check stepMismatch results for type=datetime-local.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Empty values
PASS stepMismatchFor("", null, null) is false
PASS stepMismatchFor("", "2", "1969-12-31T12:34:56") is false
Normal step values
PASS stepMismatchFor("2010-02-09T12:34:55", "1", "2010-02-09T12:34:56") is false
PASS stepMismatchFor("2010-02-09T12:34:55.001", "1", "2010-02-09T12:34:56") is true
PASS stepMismatchFor("2010-02-09T12:34:56.001", "0.001", "2010-02-09T12:34:56") is false
PASS stepMismatchFor("2010-02-09T12:34:55", "0.333", "2010-02-09T12:34:56") is true
PASS stepMismatchFor("2010-02-09T12:34:55.001", "0.333", "2010-02-09T12:34:56") is false
PASS stepMismatchFor("2010-02-09T12:34", "86400", "2010-02-08T12:34") is false
PASS stepMismatchFor("2010-02-09T12:34:56", "86400", "2010-02-08T12:34") is true
PASS stepMismatchFor("275760-09-13T00:00", "3", "275760-09-12T23:59:50") is true
PASS stepMismatchFor("275760-09-13T00:00", "2", "275760-09-12T23:59:50") is false
PASS stepMismatchFor("0001-01-01T00:00", "3", "0001-01-11T00:00:02") is true
PASS stepMismatchFor("0001-01-01T00:00", "2", "0001-01-11T00:00:02") is false
Implicit step base
PASS stepMismatchFor("1970-01-01T12:34", "120", null) is false
PASS stepMismatchFor("1970-01-01T12:35", "120", null) is true
Small step values
PASS stepMismatchFor("2010-02-10T12:34:56.000", "0.0003", "2010-02-10T12:34.55.000") is false
PASS stepMismatchFor("2010-02-10T12:34:55.001", "0.0019", "2010-02-10T12:34.55.000") is true
Invalid or no step values
PASS stepMismatchFor("2010-02-10T12:34", null, "2010-02-09T12:34") is false
PASS stepMismatchFor("2010-02-10T12:34:56", null, "2010-02-09T12:34") is true
PASS stepMismatchFor("2010-02-10T12:34", "-1", "2010-02-09T12:34") is false
PASS stepMismatchFor("2010-02-10T12:34", "foo", "2010-02-09T12:34") is false
Special step value
PASS stepMismatchFor("2010-02-09T12:34", "any", "2010-02-09T12:34") is false
Disabled
PASS stepMismatchFor("2010-02-09T12:34:55.001", "1", "2010-02-09T12:34:56", true) is true
PASS successfullyParsed is true
TEST COMPLETE