Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

helpers/mkEntries

Compute per-test result entries for an eval check.

Each test in the check becomes an entry of the form

{ kind = "eval"; status; exitCode; stdout; stderr; }

where status is "pass", "fail", or "skip". Failures carry a formatted report in stdout and a summary in stderr, matching the conventions of derivation-based checks. Entries are computed lazily: a test’s expression is only forced when its entry is, and skipped tests are never forced at all.

Skipping is controlled by skip = true on the check (set by mkSkip) or by listing test names in skipTests on the check.

Type

mkEntries :: EvalCheck -> AttrSet

Arguments

check
An eval check produced by mkEval.

Example

mkEntries (mkEval {
  testAdd = {
    expr = 1 + 2;
    expected = 3;
  };
})
=> { testAdd = { kind = "eval"; status = "pass"; exitCode = "0"; stdout = ""; stderr = ""; }; }