MCPcopy Create free account
hub / github.com/exercism/cli / TestResolve

Function TestResolve

config/resolve_windows.go:11–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestResolve(t *testing.T) {
12 cwd, err := os.Getwd()
13 assert.NoError(t, err)
14
15 testCases := []struct {
16 in, out string
17 }{
18 {"", ""}, // don't make wild guesses
19 {"C:\\alice\\\\foobar", "C:\\alice\\\\foobar"},
20 {"\\foobar\\~\\noexpand", "\\foobar\\~\\noexpand"},
21 {"\\no\\modification", "\\no\\modification"},
22 {"relative", filepath.Join(cwd, "relative")},
23 {"relative\\path", filepath.Join(cwd, "relative", "path")},
24 }
25
26 for _, tc := range testCases {
27 t.Run(tc.in, func(t *testing.T) {
28 desc := "'" + tc.in + "' should be normalized as '" + tc.out + "'"
29 assert.Equal(t, tc.out, Resolve(tc.in, ""), desc)
30 })
31 }
32}

Callers

nothing calls this directly

Calls 1

ResolveFunction · 0.85

Tested by

no test coverage detected