testkit

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 2 Imported by: 0

README

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 — v1.0.z carries the authored case set for spec 1.0, 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 canonical spelling. 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

Documentation

Overview

Package testkit carries the authored conformance cases, embedded so that one kit binary is one complete artifact: the runner and the cases it judges by can never drift apart in a release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cases

func Cases() fs.FS

Cases is the authored case tree, rooted so that case names read as their paths under cases/.

Types

This section is empty.

Directories

Path Synopsis
cmd
yarunoka-test command
Command yarunoka-test runs the embedded conformance cases against an implementation's adapter and reports the outcome.
Command yarunoka-test runs the embedded conformance cases against an implementation's adapter and reports the outcome.
internal
kit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL