From 76d52d9e1cd3696b622a2a12f20f1c32b8fd9668 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Thu, 15 May 2025 08:34:50 +0200 Subject: [PATCH] Testing flag --- src/text_editor/text_editor.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/text_editor/text_editor.cpp b/src/text_editor/text_editor.cpp index 5469f7e..05072b0 100644 --- a/src/text_editor/text_editor.cpp +++ b/src/text_editor/text_editor.cpp @@ -401,14 +401,15 @@ int main(int argc, char **argv) InitWindows(); InitOS(ReportWarningf); + bool testing = false; for (int i = 1; i < argc; i += 1) { String it = argv[i]; if (!FileExists(it)) continue; - if (EndsWith(it, ".project.lua")) { - if (!LuaProjectBuffer) { - SetProjectFile(BufferOpenFile(it)); - } + if (it == "--testing") { + testing = true; + } else if (EndsWith(it, ".project.lua")) { + SetProjectFile(BufferOpenFile(it)); } else { Window *window = GetWindow({0}); WindowOpenBufferView(window, it); @@ -416,7 +417,7 @@ int main(int argc, char **argv) } InitLuaConfig(); - InitTests(); + if (testing) InitTests(); #if _WIN32 AddCo(Windows_SetupVCVarsall); #endif