Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-10-26 04:56:00 -05:00
commit 92b7eb3727
27 files changed
+5428

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
# Runs blossom's tests of its commands. Each makes projects in a folder of its
# own, runs the blossom it's given first on them, and compares what it says and
# what it makes with what's expected. blossom's config in that folder names the
# `sakura` that `SAKURA` names, and the standard library `SAKURA_STD` names,
# where it's set, as `blossom test` sets them:
#
# blossom test --only blossom.commands
#
# or, from the root of the repository, with a blossom built:
#
# SAKURA=SAKURA sakura run tests/commands/*.sakura -- BLOSSOM
#
# Add `--only TEXT` after BLOSSOM to run those whose name holds the text, and
# `--here` to run them in one program, as a debugger wants. They run `git`, `sh`,
# and `tar`, so they run on Linux.
import std;
import std::io;
import std::process;
import system;
import std::testing;
def main(args: span<strview>): void {
if args.length == 0 || args[0].starts_with("-") {
io::println("blossom's tests are given the blossom they run first, as `-- .blossom/KEY/bin/blossom`.");
exit(2);
}
if process::variable("SAKURA") is none {
io::println("blossom's tests run the `sakura` that `SAKURA` names, as `blossom test` sets it.");
exit(2);
}
blossom_at = args[0];
exit(tester::run(args));
}