|
10 | 10 | (fact "about whitespace-aware insertion."
|
11 | 11 | (let [elements (->> (base/of-string
|
12 | 12 | (format ?fmt "1 2 3 4"))
|
13 |
| - (iterate m/next)) |
| 13 | + (iterate ?m)) |
14 | 14 | loc (nth elements ?n)
|
15 | 15 | loc' (?f loc 'x)]
|
16 | 16 | (base/tag loc) => (base/tag loc')
|
17 | 17 | (base/root-string loc') => ?s))
|
18 |
| - ?fmt ?n ?f ?s |
19 |
| - "[%s]" 0 insert-right "[1 2 3 4] x" |
20 |
| - "[%s]" 1 insert-right "[1 x 2 3 4]" |
21 |
| - "[%s]" 2 insert-right "[1 2 x 3 4]" |
22 |
| - "[%s]" 3 insert-right "[1 2 3 x 4]" |
23 |
| - "[%s]" 4 insert-right "[1 2 3 4 x]" |
24 |
| - "[%s]" 0 insert-left "x [1 2 3 4]" |
25 |
| - "[%s]" 1 insert-left "[x 1 2 3 4]" |
26 |
| - "[%s]" 2 insert-left "[1 x 2 3 4]" |
27 |
| - "[%s]" 3 insert-left "[1 2 x 3 4]" |
28 |
| - "[%s]" 4 insert-left "[1 2 3 x 4]" |
29 |
| - "[%s]" 0 insert-child "[x 1 2 3 4]" |
30 |
| - "[%s]" 0 append-child "[1 2 3 4 x]" |
31 |
| - "[ %s]" 0 insert-child "[x 1 2 3 4]" |
32 |
| - "[%s ]" 0 append-child "[1 2 3 4 x]") |
| 18 | + ?fmt ?m ?n ?f ?s |
| 19 | + "[%s]" m/next 0 insert-right "[1 2 3 4] x" |
| 20 | + "[%s]" m/next 1 insert-right "[1 x 2 3 4]" |
| 21 | + "[%s]" m/next 2 insert-right "[1 2 x 3 4]" |
| 22 | + "[%s]" m/next 3 insert-right "[1 2 3 x 4]" |
| 23 | + "[%s]" m/next 4 insert-right "[1 2 3 4 x]" |
| 24 | + "[%s]" m/next 0 insert-left "x [1 2 3 4]" |
| 25 | + "[%s]" m/next 1 insert-left "[x 1 2 3 4]" |
| 26 | + "[%s]" m/next 2 insert-left "[1 x 2 3 4]" |
| 27 | + "[%s]" m/next 3 insert-left "[1 2 x 3 4]" |
| 28 | + "[%s]" m/next 4 insert-left "[1 2 3 x 4]" |
| 29 | + "[%s]" m/next 0 insert-child "[x 1 2 3 4]" |
| 30 | + "[%s]" m/next 0 append-child "[1 2 3 4 x]" |
| 31 | + "[ %s]" m/next 0 insert-child "[x 1 2 3 4]" |
| 32 | + "[%s ]" m/next 0 append-child "[1 2 3 4 x]" |
| 33 | + "[%s]" z/next 2 insert-right "[1 x 2 3 4]" |
| 34 | + "\n[%s]" z/leftmost 1 insert-left "x\n[1 2 3 4]" |
| 35 | + "\n[%s]" z/leftmost 1 insert-right "\nx [1 2 3 4]") |
33 | 36 |
|
34 | 37 | (tabular
|
35 | 38 | (fact "about different node types that allow insertion."
|
|
0 commit comments