November 30, 2025
Cramming tests, cramming drama
Show HN: A "Cram tests" script for windows shells
Windows finally gets “cram” testing—cheers, jeers, and memes
TLDR: A new script brings “cram” style shell tests to Windows PowerShell and Cmd, with sandboxed runs and interactive output promotion. Commenters split between praising native support for locked-down corporate machines and complaining about missing regex/config and saying “just use WSL”; memes ensued.
A Windows-friendly twist on “cram” tests just dropped, and the comment section went full soap opera. The tool, “craw,” runs those snapshot-style tests (you write commands and the tool checks the output) in PowerShell or old-school Cmd, with a sandboxed test folder, exit codes shown, and an interactive “promote” mode to accept changes. But the crowd instantly split into camps. One side shouted, “Finally, native!”—perfect for corporate laptops where Linux tools are blocked. The other side waved the penguin flag: “Just use WSL!” (Windows Subsystem for Linux), insisting real shell tests live in bash. Missing goodies like regex matching and config files (.cramrc) sparked nitpicks, while fans loved the simplicity and that it mirrors classic Cram.
Then came the PowerShell vs Cmd drama. PowerShell fans flexed its features; Cmd defenders argued it’s fast and everywhere; bash purists sipped tea. Jokes cooked: “Stop trying to make Cmd happen,” “Youpi on Windows? bold,” and the mysterious [False] exit code readout became a meme (“my tests when I forgot quotes”). Some called snapshot testing “output cosplay,” others said it’s the quickest way to keep scripts honest. Love it or roast it, the community agrees: Windows shell testing just got a lot more interesting—and much louder.
Key Points
- •Craw enables Cram-style tests to run on Windows PowerShell and Cmd.
- •It interprets .t files, generates .err files, and runs tests in a sandboxed directory.
- •Supported features include environment variable handling, diff display, and non-zero exit codes on mismatches.
- •Promotion of .err to .t is available via combined -i and -y flags or --promote.
- •Not yet supported: regex in expected output, .cramrc/CRAM options, and full Cram flags handling.