All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 Execute(CreatePositions() should support single character matches):
2 AssertEqual [[[1, 5, 1]]], ale#highlight#CreatePositions(1, 5, 1, 5)
3 " When the end column is behind the start column, ignore it.
4 AssertEqual [[[2, 5, 1]]], ale#highlight#CreatePositions(2, 5, 1, 5)
6 Execute(CreatePositions() should support multiple character matches on a single line):
7 AssertEqual [[[1, 5, 6]]], ale#highlight#CreatePositions(1, 5, 1, 10)
8 " When the end column is behind the start column, ignore it.
9 AssertEqual [[[2, 5, 6]]], ale#highlight#CreatePositions(2, 5, 1, 10)
11 Execute(CreatePositions() should support character matches two lines):
12 AssertEqual [[[1, 5, 1073741824], [2, 1, 10]]], ale#highlight#CreatePositions(1, 5, 2, 10)
14 Execute(CreatePositions() should support character matches across many lines):
15 " Test chunks from 1,3 to 1,17
17 \ [[1, 5, 1073741824], 2, [3, 1, 10]],
18 \], ale#highlight#CreatePositions(1, 5, 3, 10)
20 \ [[1, 5, 1073741824], 2, 3, [4, 1, 10]],
21 \], ale#highlight#CreatePositions(1, 5, 4, 10)
23 \ [[1, 5, 1073741824], 2, 3, 4, [5, 1, 10]],
24 \], ale#highlight#CreatePositions(1, 5, 5, 10)
26 \ [[1, 5, 1073741824], 2, 3, 4, 5, [6, 1, 10]],
27 \], ale#highlight#CreatePositions(1, 5, 6, 10)
29 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, [7, 1, 10]],
30 \], ale#highlight#CreatePositions(1, 5, 7, 10)
32 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, [8, 1, 10]],
33 \], ale#highlight#CreatePositions(1, 5, 8, 10)
35 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
37 \], ale#highlight#CreatePositions(1, 5, 9, 10)
39 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
41 \], ale#highlight#CreatePositions(1, 5, 10, 10)
43 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
44 \ [9, 10, [11, 1, 10]],
45 \], ale#highlight#CreatePositions(1, 5, 11, 10)
47 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
48 \ [9, 10, 11, [12, 1, 10]],
49 \], ale#highlight#CreatePositions(1, 5, 12, 10)
51 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
52 \ [9, 10, 11, 12, [13, 1, 10]],
53 \], ale#highlight#CreatePositions(1, 5, 13, 10)
55 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
56 \ [9, 10, 11, 12, 13, [14, 1, 10]],
57 \], ale#highlight#CreatePositions(1, 5, 14, 10)
59 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
60 \ [9, 10, 11, 12, 13, 14, [15, 1, 10]],
61 \], ale#highlight#CreatePositions(1, 5, 15, 10)
63 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
64 \ [9, 10, 11, 12, 13, 14, 15, [16, 1, 10]],
65 \], ale#highlight#CreatePositions(1, 5, 16, 10)
67 \ [[1, 5, 1073741824], 2, 3, 4, 5, 6, 7, 8],
68 \ [9, 10, 11, 12, 13, 14, 15, 16],
70 \], ale#highlight#CreatePositions(1, 5, 17, 10)
71 " Test another random sample at higher lines.
73 \ [[21, 8, 1073741824], 22, 23, 24, 25, 26, 27, 28],
74 \ [29, 30, 31, 32, 33, 34, 35, 36],
76 \], ale#highlight#CreatePositions(21, 8, 37, 2)