Basic tests and trying to fix address sanitizer errors

This commit is contained in:
Krzosa Karol
2026-03-21 10:10:24 +01:00
parent 207fc65fec
commit 94ee03800d
5 changed files with 46 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
#if PLUGIN_TESTS
bool Testing = true;
void Wait(mco_coro *co) {
@@ -37,4 +38,19 @@ void CO_FirstTest(mco_coro *co) {
{Event ev = {};ev.kind = EVENT_TEXT_INPUT; ev.xwindow = 1412; ev.ywindow = 1032; ev.xmouse = 1234; ev.ymouse = 594; ev.text = "f"; Add(&EventPlayback, ev);}
Wait(co);
String16 result = uR"FOO(
Memes and stuff)FOO";
BSet set = GetBSet(PrimaryWindowID);
Assert(AreEqual(result, GetString(set.buffer)));
void CMD_QuitWithoutSaving();
CMD_QuitWithoutSaving();
} RegisterCoroutineCommand(CO_FirstTest, "", "Basic tests");
#endif