Skip to content

Commit 012a16d

Browse files
committed
Add test case to reproduce remote path parse failure
1 parent a4cfe9c commit 012a16d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/suite/get-tool-url.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ suite("Get tool URL: gitRemotePath", (): void => {
4040
assert.strictEqual(call(func, "1"), "to");
4141
assert.strictEqual(call(func, "2"), "something");
4242
});
43+
test("org-1234@", (): void => {
44+
const func = gitRemotePath("org-1234@example.com:path/to/something/");
45+
46+
assert.strictEqual(call(func), "/path/to/something/");
47+
assert.strictEqual(call(func, "0"), "path");
48+
assert.strictEqual(call(func, "1"), "to");
49+
assert.strictEqual(call(func, "2"), "something");
50+
});
4351
test("http:// with port", (): void => {
4452
const func = gitRemotePath("http://example.com:8080/path/to/something/");
4553

0 commit comments

Comments
 (0)