Snapshot for release 2026.10.28.3 (internal 7496938)

This commit is contained in:
Tom Bohar 2026-10-28 23:23:44 -04:00
commit f9db7bad87
24 changed files with 583 additions and 98 deletions

View file

@ -35,6 +35,7 @@ namespace RynthThreads.Tests
InferenceTests.Register(runner);
StoreTests.Register(runner);
WindowTests.Register(runner);
ReplyTests.Register(runner);
int rc = runner.Run("RynthThreads tests", args.Length > 0 ? args[0] : null);
try { Directory.Delete(TempRoot, recursive: true); } catch { }
return rc;

View file

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using RynthCore.Plugin.RynthThreads;
using RynthCore.RynthAiTests.Harness;
namespace RynthThreads.Tests;
// Every /rthreads command answers in chat (2026-10-28). RunCommand needs the plugin's host, so the words,
// the verb each one is, and the lines are checked here.
internal static class ReplyTests
{
public static void Register(Runner r)
{
r.Add("replies: every /rthreads word, typed right and wrong", Words);
r.Add("replies: the window, help and unknown-word lines", Lines);
}
private static void Words()
{
var table = new (string Typed, ThreadsVerb Verb)[]
{
("", ThreadsVerb.Window), ("stats", ThreadsVerb.Stats), ("STATS now", ThreadsVerb.Stats), ("export", ThreadsVerb.Export),
("help", ThreadsVerb.Help), ("?", ThreadsVerb.Help), ("odds", ThreadsVerb.Unknown),
};
var seen = new HashSet<ThreadsVerb>();
foreach (var (typed, verb) in table)
{
Check.Eq(ThreadsCommands.Parse(typed, out _), verb, $"'/rthreads {typed}'");
seen.Add(verb);
}
foreach (ThreadsVerb v in Enum.GetValues<ThreadsVerb>()) Check.True(seen.Contains(v), $"the table covers /rthreads' {v}");
ThreadsCommands.Parse("Odds please", out string word);
Check.Eq(word, "odds", "the unknown word, for its line");
}
private static void Lines()
{
Check.Eq(ThreadsCommands.Window(true), "The Threads window shown.", "toggle: shown");
Check.Eq(ThreadsCommands.Window(false), "The Threads window hidden.", "toggle: hidden");
Check.True(ThreadsCommands.Help.Contains("/rthreads stats") && ThreadsCommands.Help.Contains("/rthreads export"), "help names the verbs");
Check.Eq(ThreadsCommands.Unknown("odds"), "Unknown '/rthreads odds'. Usage: /rthreads [stats | export | help]", "an unknown word");
Check.True(ThreadsCommands.NoWindows.Contains("can't show plugin windows"), "no plugin windows: why");
}
}

View file

@ -31,6 +31,7 @@
<ItemGroup>
<Compile Include="..\..\Plugins\RynthCore.Plugin.RynthThreads\**\*.cs" Exclude="..\..\Plugins\RynthCore.Plugin.RynthThreads\obj\**;..\..\Plugins\RynthCore.Plugin.RynthThreads\bin\**" Link="RynthThreads\%(RecursiveDir)%(Filename)%(Extension)" />
<Compile Include="..\..\..\RynthCore\src\RynthCore.Engine\UI\ScriptWindows\DisplayListParser.cs" Link="Engine\DisplayListParser.cs" />
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\CommandReply.cs" Link="Shared\CommandReply.cs" />
<!-- The RynthAi test tools' check/runner harness (no plugin code in it). -->
<Compile Include="$(RynthSuiteRoot)Tools\RynthCore.RynthAiTests\Harness\Check.cs" Link="Harness\Check.cs" />
<Compile Include="$(RynthSuiteRoot)Tools\RynthCore.RynthAiTests\Harness\Runner.cs" Link="Harness\Runner.cs" />