yarunoka-test
The conformance test kit for Yrnk,
the Yarunoka schedule DSL: the authored conformance cases and the runner
that judges them, in one binary.
The kit checks that an implementation reads Yrnk documents with the
meaning the spec defines. The implementer writes a single small
adapter — an executable that receives a document and a query on
stdin and answers on stdout — and the kit does the rest: it runs every
embedded case against the adapter, judges the answers, and reports what
failed and why. See docs/protocol.md for the
adapter contract.
Versioning: the kit's version tracks the spec version its embedded
cases target — vX.Y.z carries the authored case set for spec X.Y, and
the last digit counts the kit's own fixes within that target.
Usage
$ yarunoka-test eval php adapter.php
$ yarunoka-test emit php adapter.php
$ yarunoka-test all php adapter.php
Everything after the mode is the adapter command, passed through
verbatim and started once per case. The runner exits non-zero unless
every case passes, so one line integrates it into any CI.
The mode is required:
- eval — the three queries of the evaluation model (the judgment at
a point, the judgment over a period, the enumeration)
- emit — the round-trip spelling check: parse, re-emit, compare
against the document as authored. For implementations with a
serializer
- all — both
Passing eval and passing emit are independent claims — an
evaluation-only implementation ships with eval alone, and "kit vX.Y
eval passed" is a complete statement. The summary printed after a run
(kit version, targeted spec version, case count, per-mode tally) is
made to be pasted wherever that claim is stated.
Passing the kit does not certify an implementation — a finite case set
cannot. The claim it supports is exactly "this kit version, passed".
Install
Prebuilt binaries per OS and architecture come with each
release. Building from
source works the usual way:
$ go install github.com/yarunoka-dev/test/cmd/yarunoka-test@latest
License
MIT