blob: 0c258bc681fe9bc6f678ad2e4b56163b9c980827 [file] [log] [blame]
Check stepping-up and -down for month input fields from renderer.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Function arguments are (value, min, max, [keySequence]).
Month
PASS stepUp("2000-05", "2000-05", "2000-10") is "2000-06"
PASS stepDown("2000-05", "2000-05", "2000-10") is "2000-10"
PASS stepUp("2000-05", "2000-02", "2000-05") is "2000-02"
PASS stepDown("2000-05", "2000-02", "2000-05") is "2000-04"
PASS stepUp("2000-05", "2000-08", "2000-10") is "2000-08"
PASS stepDown("2000-05", "2000-08", "2000-10") is "2000-10"
PASS stepUp("2000-05", "2000-03", "2000-03") is "2000-03"
PASS stepDown("2000-05", "2000-03", "2000-03") is "2000-03"
PASS stepUp("2000-05", "2000-03", "2001-05") is "2000-06"
PASS stepDown("2000-05", "2000-05", "2001-08") is "2000-04"
Year
PASS stepUp("2000-01", "2000-01", "2009-12") is "2001-01"
PASS stepDown("2000-01", "2000-01", "2009-12") is "2009-01"
PASS stepUp("2000-01", "1990-01", "2000-12") is "1990-01"
PASS stepDown("2000-01", "1990-01", "2000-12") is "1999-01"
PASS stepUp("275760-01", "1990-01", null) is "1990-01"
PASS stepDown("1990-01", "1990-01", null) is "275760-01"
PASS stepUp("2000-01", null, "2000-12") is "0001-01"
PASS stepDown("0001-01", null, "2000-12") is "2000-01"
PASS stepUp("1990-01", "2000-01", "2009-12") is "2000-01"
PASS stepDown("1990-01", "2000-01", "2009-12") is "2009-01"
PASS stepUp("2020-01", "2000-01", "2000-12") is "2000-01"
PASS stepDown("2020-01", "2000-01", "2000-12") is "2000-01"
PASS successfullyParsed is true
TEST COMPLETE