39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
Check stepMismatch results for type=week.
|
|
|
|
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", "1970-W02") is false
|
|
Normal step values
|
|
PASS stepMismatchFor("2010-W03", "2", "2010-W02") is true
|
|
PASS stepMismatchFor("2010-W02", "2", "2010-W02") is false
|
|
PASS stepMismatchFor("2010-W04", "2", "2010-W02") is false
|
|
PASS stepMismatchFor("1800-W11", "3", "1800-W09") is true
|
|
PASS stepMismatchFor("1800-W09", "3", "1800-W09") is false
|
|
PASS stepMismatchFor("1800-W12", "3", "1800-W09") is false
|
|
PASS stepMismatchFor("275760-W35", "3", "275760-W33") is true
|
|
PASS stepMismatchFor("275760-W35", "2", "275760-W33") is false
|
|
Implicit step base
|
|
PASS stepMismatchFor("1970-W01", "2", null) is false
|
|
PASS stepMismatchFor("1970-W02", "2", null) is true
|
|
PASS stepMismatchFor("1970-W03", "2", null) is false
|
|
PASS stepMismatchFor("1970-W04", "2", null) is true
|
|
Fractional step values
|
|
PASS stepMismatchFor("2010-W03", "0.1", "2010-W02") is false
|
|
PASS stepMismatchFor("2010-W03", "1.1", "2010-W02") is false
|
|
PASS stepMismatchFor("2010-W03", "1.9", "2010-W02") is true
|
|
Invalid or no step values
|
|
PASS stepMismatchFor("2010-W03", null, "2010-W02") is false
|
|
PASS stepMismatchFor("2010-W03", "-1", "2010-W02") is false
|
|
PASS stepMismatchFor("2010-W03", "foo", "2010-W02") is false
|
|
Special step value
|
|
PASS stepMismatchFor("2010-W03", "any", "2010-W02") is false
|
|
Disabled
|
|
PASS stepMismatchFor("2010-W03", "2", "2010-W02", true) is false
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|