MCPcopy Index your code
hub / github.com/cheat/cheat / TestFilterFailure

Function TestFilterFailure

internal/cheatpath/filter_test.go:39–53  ·  view source on GitHub ↗

TestFilterFailure asserts that an error is returned when a non-existent cheatpath is requested

(t *testing.T)

Source from the content-addressed store, hash-verified

37// TestFilterFailure asserts that an error is returned when a non-existent
38// cheatpath is requested
39func TestFilterFailure(t *testing.T) {
40
41 // init cheatpaths
42 paths := []Path{
43 Path{Name: "foo"},
44 Path{Name: "bar"},
45 Path{Name: "baz"},
46 }
47
48 // filter the paths
49 _, err := Filter(paths, "qux")
50 if err == nil {
51 t.Errorf("failed to return an error on non-existent cheatpath")
52 }
53}

Callers

nothing calls this directly

Calls 1

FilterFunction · 0.70

Tested by

no test coverage detected