MCPcopy
hub / github.com/restic/restic / TestParse

Function TestParse

internal/backend/location/location_test.go:24–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestParse(t *testing.T) {
25 registry := location.NewRegistry()
26 registry.Register(testFactory())
27
28 path := "local:example"
29 u, err := location.Parse(registry, path)
30 test.OK(t, err)
31 test.Equals(t, "local", u.Scheme)
32 test.Equals(t, any(&testConfig{loc: path}), u.Config)
33}
34
35func TestParseFallback(t *testing.T) {
36 fallbackTests := []string{

Callers

nothing calls this directly

Calls 6

RegisterMethod · 0.95
NewRegistryFunction · 0.92
ParseFunction · 0.92
OKFunction · 0.92
EqualsFunction · 0.92
testFactoryFunction · 0.85

Tested by

no test coverage detected