MCPcopy Index your code
hub / github.com/go-task/task / TestScheme

Function TestScheme

taskfile/node_test.go:9–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestScheme(t *testing.T) {
10 t.Parallel()
11
12 scheme, err := getScheme("https://github.com/foo/bar.git")
13 assert.NoError(t, err)
14 assert.Equal(t, "git", scheme)
15 scheme, err = getScheme("https://github.com/foo/bar.git?ref=v1//taskfile/common.yml")
16 assert.NoError(t, err)
17 assert.Equal(t, "git", scheme)
18 scheme, err = getScheme("git@github.com:foo/bar.git?ref=main//Taskfile.yml")
19 assert.NoError(t, err)
20 assert.Equal(t, "git", scheme)
21 scheme, err = getScheme("https://github.com/foo/common.yml")
22 assert.NoError(t, err)
23 assert.Equal(t, "https", scheme)
24 scheme, err = getScheme("https://some-azure-host.com/org/project/_git/repo")
25 assert.NoError(t, err)
26 assert.Equal(t, "git", scheme)
27}

Callers

nothing calls this directly

Calls 1

getSchemeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…