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