# env/envtest

> Package envtest checks third-party environments against zelk's portable file and cancellation contract.

<!-- Generated from the Go source of github.com/barevoidco/zelk/core/env/envtest (cmd/zelk/internal/reference TestReferenceGoAPI). Don't edit: change the code, then run make reference. -->

```go
import "github.com/barevoidco/zelk/core/env/envtest"
```

Package envtest checks third-party environments against zelk's portable file and cancellation contract. Factories own environment cleanup.


## Run

```go
func Run(t *testing.T, factory Factory)
```

Run checks portable reads, conditional writes, searches, path confinement and cancellation. Process execution and claimed enforcement need implementation- specific integration tests, since executable availability is host-defined.


## Factory

```go
type Factory func(t *testing.T) env.Environment
```

Factory returns a fresh writable environment with an empty workspace for each case. It registers cleanup with t and must support concurrent method calls.
