Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ package-local `TODO.md` files (for example
bun run test:rip # language suite (PR code check)
bun run test # fast compiler/runtime suite
bun run test:all # exhaustive: extended tier + every package
bun run test:tui # the same lanes, drawn live on packages/tui
rip check [paths...] # headless TypeScript checking over Rip source
bun run parser # regenerate src/parser.js
bun run corpus
Expand All @@ -66,6 +67,22 @@ every entry, and compile errors are never cached. `RIP_CACHE_DIR=<dir>`
relocates the cache and `RIP_NO_CACHE=1` disables it. Entries unread for
a week are pruned; `rm -rf .rip/cache` is the full reset.

### The live runner

`bun run test:tui` runs the lanes `test:all` runs, with the same
scheduler, the same verdict and the same exit code, and draws them
live: a cell per lane, a bar for the whole run with its ETA, a bar per
lane in flight against its last duration, each finished lane scrolled
into the scrollback as one aligned row, and a card for the first
failure of each failing lane (`↑`/`↓` choose, Enter opens the lane's
output, `f` shows only the failing lanes, `q` stops the run and every
lane's process group). At the end each failing lane's output is printed
as `test:all` prints it, then a summary card. Each complete run leaves
the lanes' times and counts in `.rip/test-last.json` for the next run's
bars and ETA. Piped, under `CI`, or with `--plan` it is `test:all`
itself. It takes `test:all`'s flags; both front ends are
`scripts/lanes.mjs` underneath.

`test:all` needs `janus` on PATH for the Sites integration lane. Install
[Janus](https://github.com/shreeve/janus#prebuilt-releases), or put a Janus
build on PATH. The lane exercises that binary and rejects a local Go module
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"test:browser": "bun --cwd=test/browser run test:smoke",
"test:live": "bun --cwd=test/browser run test:live",
"test:rip": "bun test test/rip.test.js --timeout 15000",
"test:spawn": "bun test --timeout 15000 test/spawn"
"test:spawn": "bun test --timeout 15000 test/spawn",
"test:tui": "bun scripts/test-live.rip"
},
"bin": {
"rip": "bin/rip"
Expand Down
8 changes: 7 additions & 1 deletion packages/tui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Each runs with `rip examples/<name>.rip` from `packages/tui`.
| `log.rip` | A build log: finished steps into the scrollback through `Static`, a spinner and a bar on the `clock`, a warning above the frame through `print`, the terminal's own progress indicator, and a quit when the last step is done. |
| `input.rip` | A single-line text field in 40 lines of code: the cursor placed by measured cells, so a wide glyph is two columns and a letter with its marks one; typing inserts at the cursor, the arrows, Home and End move it, Backspace and Delete take a cluster, a paste goes in whole, Enter prints the value above the field and clears it, Escape clears it. |
| `ink/*.rip` | The four ports above, Ink's source beside each. |
| [`scripts/test-live.rip`](../../scripts/test-live.rip) | The framework in daily use: the repository's own `bun run test:tui`, every lane of the test run drawn live — spinners and bars on one `clock`, finished lanes into the scrollback through `Static`, failure cards in rounded borders with `link` to the file, the terminal's progress indicator — and `test/live.rip` drives it headless through `mount`. |

`log.rip`, `input.rip` and the ports export their component and run it
only as the entry (`run App if import.meta.main`), which is how
Expand Down Expand Up @@ -873,7 +874,12 @@ four ports under `examples/ink/` through `mount` and holds each frame
to the one Ink draws for its example, holds the line table above to
what `test/lines.rip` counts, and types, moves, deletes and pastes
into `examples/input.rip`, holding the frame and the cursor after
every key. `test/text.rip` holds the
every key. `test/live.rip` drives the repository's live test runner
with a lane source fed by hand: the lanes in flight and their bars, the
strip, the scrollback rows in their colors, the progress indicator, the
failure cards and `f`, the output Enter opens, and the end — the
failing output as the plain runner prints it, the end card, the exit
code. `test/text.rip` holds the
text engine — sanitizing, cluster widths, every wrap and truncate mode
— and `test/layout.rip` the layout engine's own pins. `test/input.rip`
holds the terminal input parser: 244 of Ink's input cases as a table
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
".": "./tui.rip"
},
"scripts": {
"test": "rip test.rip && rip test/text.rip && rip test/layout.rip && rip test/input.rip && rip test/events.rip && rip test/mouse.rip && rip test/ink.rip && rip test/yoga.rip && rip test/yoga-aspect.rip && rip test/yoga-hand.rip && rip test/fuzz.rip && rip test/damage.rip && rip test/terminal.rip && rip test/examples.rip",
"test": "rip test.rip && rip test/text.rip && rip test/layout.rip && rip test/input.rip && rip test/events.rip && rip test/mouse.rip && rip test/ink.rip && rip test/yoga.rip && rip test/yoga-aspect.rip && rip test/yoga-hand.rip && rip test/fuzz.rip && rip test/damage.rip && rip test/terminal.rip && rip test/examples.rip && rip test/live.rip",
"demo": "rip demo.rip"
},
"files": [
Expand Down
Loading
Loading