diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-05-02 15:37:12 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-05-02 16:24:58 +0530 |
| commit | 8f974223f4318ed9a0d3035b4c11d0f5b015efec (patch) | |
| tree | 028782193fa5c3cfa20a32b83b8f22e948c3ed9d /spec/main.cpp | |
| parent | 398b1a4b398324311b6e0f15d2e4ede5ad8500ff (diff) | |
| download | null-browser-8f974223f4318ed9a0d3035b4c11d0f5b015efec.tar.gz null-browser-8f974223f4318ed9a0d3035b4c11d0f5b015efec.zip | |
Refactor dmenu to be instantiable + add luassert for assertions
Diffstat (limited to '')
| -rw-r--r-- | spec/main.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/main.cpp b/spec/main.cpp index 1f60aea..6de21e2 100644 --- a/spec/main.cpp +++ b/spec/main.cpp @@ -1,37 +1,7 @@ #include <QtCore> -#include "LuaRuntime.hpp" #include "testUtils.h" -int run_lua_tests() { - QString test_name = getenv("TEST_NAME"); - if (test_name.startsWith("lua ")) { - test_name = test_name.remove(0, 4); - } else if (!test_name.isEmpty()) - return 0; - - QDir dir("../spec/lua"); // TODO: relative to root instead of build/? - QStringList spec_files = dir.entryList(QDir::Files); - auto &lua = LuaRuntime::instance(); - - lua.start_event_loop(); - lua.require_module("null-browser.test-utils"); - - for (auto &file : spec_files) { - auto is_spec = file.endsWith("_spec.lua"); - auto should_run_spec = test_name.isEmpty() || file.contains(test_name); - if (is_spec && should_run_spec) { - qDebug() << "Running suite: " << file; - lua.load_file_sync(dir.filePath(file)); - } - } - - lua.stop_event_loop(); - - qDebug() << "Tests ran successfully"; - return 0; -} - int main(int argc, char **argv) { QApplication app(argc, argv); |
