MCPcopy Index your code
hub / github.com/expr-lang/expr / TestIssue756

Function TestIssue756

test/issues/756/issue_test.go:17–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestIssue756(t *testing.T) {
18 env := map[string]any{
19 "_goctx_": context.TODO(),
20 "_g_": map[string]*X{
21 "rpc": {},
22 },
23 "text": "еуче",
24 }
25 exprStr := `let v = _g_.rpc.HelloCtx(text); v`
26 program, err := expr.Compile(exprStr, expr.Env(env), expr.WithContext("_goctx_"))
27 require.NoError(t, err)
28
29 _, err = expr.Run(program, env)
30 require.NoError(t, err)
31}

Callers

nothing calls this directly

Calls 5

CompileFunction · 0.92
EnvStruct · 0.92
WithContextFunction · 0.92
NoErrorFunction · 0.92
RunFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…