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

Function TestExpr_crash

expr_test.go:2708–2714  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2706}
2707
2708func TestExpr_crash(t *testing.T) {
2709 content, err := os.ReadFile("testdata/crash.txt")
2710 require.NoError(t, err)
2711
2712 _, err = expr.Compile(string(content))
2713 require.Error(t, err)
2714}
2715
2716func TestExpr_crash_with_zero(t *testing.T) {
2717 code := "if\x00"

Callers

nothing calls this directly

Calls 3

NoErrorFunction · 0.92
CompileFunction · 0.92
ErrorFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…