MCPcopy Create free account
hub / github.com/expr-lang/expr / TestIssue888

Function TestIssue888

test/issues/888/issue_test.go:28–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestIssue888(t *testing.T) {
29 env := map[string]any{
30 "Container": Container{
31 ID: "id",
32 List: []string{"foo", "bar", "baz"},
33 },
34 }
35
36 code := `Container.IncludesAny("nope", "nope again", "bar")`
37
38 program, err := expr.Compile(code, expr.Env(env))
39 require.NoError(t, err)
40
41 output, err := expr.Run(program, env)
42 require.NoError(t, err)
43 require.Equal(t, true, output)
44}

Callers

nothing calls this directly

Calls 5

CompileFunction · 0.92
EnvStruct · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…