1 Tests find going both forward and backwards in small and large documents.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS testFind('abc', 'a', forward) is '0, 1'
7 PASS testFind('abc', 'b', forward) is '1, 2'
8 PASS testFind('abc', 'c', forward) is '2, 3'
9 PASS testFind('abc', 'a', backward) is '0, 1'
10 PASS testFind('abc', 'b', backward) is '1, 2'
11 PASS testFind('abc', 'c', backward) is '2, 3'
12 PASS testFind(tenThousandCharacters + 'abc' + tenThousandCharacters, 'a', forward) is '10000, 10001'
13 PASS testFind(tenThousandCharacters + 'abc' + tenThousandCharacters, 'b', forward) is '10001, 10002'
14 PASS testFind(tenThousandCharacters + 'abc' + tenThousandCharacters, 'c', forward) is '10002, 10003'
15 PASS testFind(tenThousandCharacters + 'abc' + tenThousandCharacters, 'a', backward) is '10000, 10001'
16 PASS testFind(tenThousandCharacters + 'abc' + tenThousandCharacters, 'b', backward) is '10001, 10002'
17 PASS testFind(tenThousandCharacters + 'abc' + tenThousandCharacters, 'c', backward) is '10002, 10003'
18 PASS testFind('abcabc', 'a', forward) is '0, 1'
19 PASS testFind('abcabc', 'b', forward) is '1, 2'
20 PASS testFind('abcabc', 'c', forward) is '2, 3'
21 PASS testFind('abcabc', 'a', backward) is '3, 4'
22 PASS testFind('abcabc', 'b', backward) is '4, 5'
23 PASS testFind('abcabc', 'c', backward) is '5, 6'
24 PASS testFind(tenThousandCharacters + 'abcabc' + tenThousandCharacters, 'a', forward) is '10000, 10001'
25 PASS testFind(tenThousandCharacters + 'abcabc' + tenThousandCharacters, 'b', forward) is '10001, 10002'
26 PASS testFind(tenThousandCharacters + 'abcabc' + tenThousandCharacters, 'c', forward) is '10002, 10003'
27 PASS testFind(tenThousandCharacters + 'abcabc' + tenThousandCharacters, 'a', backward) is '10003, 10004'
28 PASS testFind(tenThousandCharacters + 'abcabc' + tenThousandCharacters, 'b', backward) is '10004, 10005'
29 PASS testFind(tenThousandCharacters + 'abcabc' + tenThousandCharacters, 'c', backward) is '10005, 10006'
30 PASS successfullyParsed is true