Skip to content

Commit 8fb0b24

Browse files
committed
🌿 Use absolute paths in bufname tests
1 parent 8fdfad6 commit 8fb0b24

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

denops_std/bufname/bufname_test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Deno.test("format returns buffer name string from Bufname instance", () => {
6060
Deno.test("format encodes unusable characters in 'path'", () => {
6161
const src = {
6262
scheme: "denops",
63-
path: "<>|?*",
63+
path: "/<>|?*",
6464
};
6565
const dst = format(src);
66-
const exp = "denops://%3c%3e%7c%3f%2a";
66+
const exp = "denops:///%3c%3e%7c%3f%2a";
6767
assertEquals(dst, exp);
6868
});
6969
Deno.test("format returns buffer name string from Bufname instance (with URLSearchParams)", () => {
@@ -131,15 +131,15 @@ Deno.test("format returns buffer name string from Bufname instance (with URLSear
131131
Deno.test("format encodes ';' and '#' in 'path'", () => {
132132
const src = {
133133
scheme: "denops",
134-
path: "hello;world#hello",
134+
path: "/hello;world#hello",
135135
};
136136
const dst = format(src);
137-
const exp = "denops://hello%3bworld%23hello";
137+
const exp = "denops:///hello%3bworld%23hello";
138138
assertEquals(dst, exp);
139139
});
140140

141141
Deno.test("parse throws exception when 'expr' contains unusable characters", () => {
142-
const src = "denops://<>|?*";
142+
const src = "denops:///<>|?*";
143143
assertThrows(
144144
() => {
145145
parse(src);
@@ -185,11 +185,11 @@ Deno.test("parse returns Bufname instance from buffer name", () => {
185185
assertEquals(dst, exp);
186186
});
187187
Deno.test("parse decodes percent-encoded characters in 'path'", () => {
188-
const src = "denops://%3c%3e%7c%3f%2a";
188+
const src = "denops:///%3c%3e%7c%3f%2a";
189189
const dst = parse(src);
190190
const exp = {
191191
scheme: "denops",
192-
path: "<>|?*",
192+
path: "/<>|?*",
193193
};
194194
assertEquals(dst, exp);
195195
});
@@ -254,11 +254,11 @@ Deno.test("parse returns Bufname instance from buffer name (with params and frag
254254
assertEquals(dst, exp);
255255
});
256256
Deno.test("parse decode percent-encoded characters (';' and '#') in 'path'", () => {
257-
const src = "denops://hello%3bworld%23hello";
257+
const src = "denops:///hello%3bworld%23hello";
258258
const dst = parse(src);
259259
const exp = {
260260
scheme: "denops",
261-
path: "hello;world#hello",
261+
path: "/hello;world#hello",
262262
};
263263
assertEquals(dst, exp);
264264
});

0 commit comments

Comments
 (0)