import std; import Crafter.Build; using namespace Crafter; int main() { // Local() is the no-op runner — empty exec template, name "local". if (TestRunner::Local().name != "local") return 1; // FromSpec parses each known kind and labels it consistently. auto cmd = TestRunner::FromSpec("cmd:wine"); if (!cmd || cmd->name != "cmd:wine") return 1; auto local = TestRunner::FromSpec("local"); if (!local || local->name != "local") return 1; // Empty input returns nullopt; anything else unrecognized throws. // ssh/sshwin/wsl used to be valid specs; they're now bogus (issue #8). if (TestRunner::FromSpec("")) return 1; for (auto bogus : { "nonsense:thing", "ssh:somehost", "sshwin:winhost", "wsl" }) { try { TestRunner::FromSpec(bogus); return 1; } catch (const std::exception&) {} } return 0; }