Skip to content

Commit c35c967

Browse files
authored
Merge pull request #23 from vim-fall/add-processor-tests
Add processor tests
2 parents 672c011 + 13c3eb1 commit c35c967

31 files changed

+1327
-113
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ The following is a minimum configuration example. It only defines several
8181
fundamental pickers as default configurations.
8282

8383
```typescript
84-
import { type Entrypoint } from "jsr:@vim-fall/std@^0.2.0";
85-
import * as builtin from "jsr:@vim-fall/std@^0.2.0/builtin";
84+
import { type Entrypoint } from "jsr:@vim-fall/std@^0.3.2";
85+
import * as builtin from "jsr:@vim-fall/std@^0.3.2/builtin";
8686

8787
export const main: Entrypoint = ({
8888
defineItemPickerFromSource,

autoload/fall/command/FallConfig.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function! fall#command#FallConfig#call() abort
1313
call mkdir(fnamemodify(l:path, ':h'), 'p')
1414
call writefile(readfile(s:fall_config_template), l:path)
1515
endif
16-
execute 'vsplit' fnameescape(l:path)
16+
execute 'edit' fnameescape(l:path)
1717
augroup fall_config
1818
autocmd!
1919
autocmd BufWritePost <buffer> call s:reload()

denops/fall/_assets/default.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
type Entrypoint,
44
refineCurator,
55
refineSource,
6-
} from "jsr:@vim-fall/std@^0.2.0";
7-
import * as builtin from "jsr:@vim-fall/std@^0.2.0/builtin";
6+
} from "jsr:@vim-fall/std@^0.3.2";
7+
import * as builtin from "jsr:@vim-fall/std@^0.3.2/builtin";
88

99
const myPathActions = {
1010
...builtin.action.defaultOpenActions,

denops/fall/_assets/minimum.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type Entrypoint } from "jsr:@vim-fall/std@^0.2.0";
2-
import * as builtin from "jsr:@vim-fall/std@^0.2.0/builtin";
1+
import { type Entrypoint } from "jsr:@vim-fall/std@^0.3.2";
2+
import * as builtin from "jsr:@vim-fall/std@^0.3.2/builtin";
33

44
export const main: Entrypoint = ({
55
defineItemPickerFromSource,

denops/fall/component/_component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Denops } from "jsr:@denops/std@^7.3.0";
2-
import * as popup from "jsr:@denops/std@^7.3.0/popup";
1+
import type { Denops } from "jsr:@denops/std@^7.3.2";
2+
import * as popup from "jsr:@denops/std@^7.3.2/popup";
33
import type { Border } from "jsr:@vim-fall/std@^0.2.0/theme";
44
import type { Dimension } from "jsr:@vim-fall/std@^0.2.0/coordinator";
55

denops/fall/component/_component_test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test } from "jsr:@denops/test@^3.0.4";
2-
import * as fn from "jsr:@denops/std@^7.3.0/function";
2+
import * as fn from "jsr:@denops/std@^7.3.2/function";
33
import { assertEquals, assertNotEquals } from "jsr:@std/assert@^1.0.7";
44

55
import { screentext } from "./_testutil.ts";
@@ -83,8 +83,8 @@ test("nvim", "Component", async (denops, t) => {
8383
width + 2,
8484
height + 2,
8585
);
86-
assertEquals(winrow, 2); // +1 for border
87-
assertEquals(wincol, 2); // +1 for border
86+
assertEquals(winrow, 1);
87+
assertEquals(wincol, 1);
8888
assertEquals(width, 5);
8989
assertEquals(height, 5);
9090
assertEquals(content, [
@@ -155,8 +155,8 @@ test("nvim", "Component", async (denops, t) => {
155155
width + 2,
156156
height + 2,
157157
);
158-
assertEquals(winrow, 11); // +1 for border
159-
assertEquals(wincol, 11); // +1 for border
158+
assertEquals(winrow, 10);
159+
assertEquals(wincol, 10);
160160
assertEquals(width, 10);
161161
assertEquals(height, 10);
162162
assertEquals(content, [
@@ -225,8 +225,8 @@ test("nvim", "Component", async (denops, t) => {
225225
width + 2,
226226
height + 2,
227227
);
228-
assertEquals(winrow, 2); // +1 for border
229-
assertEquals(wincol, 2); // +1 for border
228+
assertEquals(winrow, 1);
229+
assertEquals(wincol, 1);
230230
assertEquals(width, 5);
231231
assertEquals(height, 5);
232232
assertEquals(content, [
@@ -284,18 +284,18 @@ test("nvim", "Component", async (denops, t) => {
284284
width + 2,
285285
height + 2,
286286
);
287-
assertEquals(winrow, 2); // +1 for border
288-
assertEquals(wincol, 2); // +1 for border
287+
assertEquals(winrow, 1);
288+
assertEquals(wincol, 1);
289289
assertEquals(width, 5);
290290
assertEquals(height, 5);
291291
assertEquals(content, [
292292
" ",
293-
" ",
294-
" ",
295-
" ",
296-
" ",
297-
" ",
298-
" ",
293+
"~ ",
294+
"~ ",
295+
"~ ",
296+
"~ ",
297+
"~ ",
298+
"~ ",
299299
]);
300300
});
301301
});

denops/fall/component/_testutil.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Denops } from "jsr:@denops/std@^7.3.0";
2-
import * as fn from "jsr:@denops/std@^7.3.0/function";
3-
import { collect } from "jsr:@denops/std@^7.3.0/batch";
1+
import type { Denops } from "jsr:@denops/std@^7.3.2";
2+
import * as fn from "jsr:@denops/std@^7.3.2/function";
3+
import { collect } from "jsr:@denops/std@^7.3.2/batch";
44
import * as iterutil from "jsr:@core/iterutil@^0.9/pipe";
55
import { range } from "jsr:@core/iterutil@^0.9.0";
66
import { pipe } from "jsr:@core/pipe@^0.4.0";

denops/fall/component/input.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Denops } from "jsr:@denops/std@^7.3.0";
2-
import * as fn from "jsr:@denops/std@^7.3.0/function";
3-
import * as buffer from "jsr:@denops/std@^7.3.0/buffer";
1+
import type { Denops } from "jsr:@denops/std@^7.3.2";
2+
import * as fn from "jsr:@denops/std@^7.3.2/function";
3+
import * as buffer from "jsr:@denops/std@^7.3.2/buffer";
44
import type { Dimension } from "jsr:@vim-fall/std@^0.2.0/coordinator";
55

66
import { Spinner } from "../lib/spinner.ts";

denops/fall/component/input_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { assertEquals } from "jsr:@std/assert@^1.0.6";
44
import { delay } from "jsr:@std/async@^1.0.7";
55
import { test } from "jsr:@denops/test@^3.0.4";
66
import { fromFileUrl } from "jsr:@std/path@^1.0.8/from-file-url";
7-
import { listDecorations } from "jsr:@denops/std@^7.3.0/buffer";
8-
import * as fn from "jsr:@denops/std@^7.3.0/function";
7+
import { listDecorations } from "jsr:@denops/std@^7.3.2/buffer";
8+
import * as fn from "jsr:@denops/std@^7.3.2/function";
99

1010
import {
1111
HIGHLIGHT_COUNTER,

denops/fall/component/list.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { Denops } from "jsr:@denops/std@^7.3.0";
2-
import type { Decoration } from "jsr:@denops/std@^7.3.0/buffer";
3-
import { batch } from "jsr:@denops/std@^7.3.0/batch";
4-
import * as fn from "jsr:@denops/std@^7.3.0/function";
5-
import * as buffer from "jsr:@denops/std@^7.3.0/buffer";
1+
import type { Denops } from "jsr:@denops/std@^7.3.2";
2+
import type { Decoration } from "jsr:@denops/std@^7.3.2/buffer";
3+
import { batch } from "jsr:@denops/std@^7.3.2/batch";
4+
import * as fn from "jsr:@denops/std@^7.3.2/function";
5+
import * as buffer from "jsr:@denops/std@^7.3.2/buffer";
66
import type { DetailUnit, DisplayItem } from "jsr:@vim-fall/std@^0.2.0/item";
77
import type { Dimension } from "jsr:@vim-fall/std@^0.2.0/coordinator";
88

0 commit comments

Comments
 (0)