diff --git a/regression/CMakeLists.txt b/regression/CMakeLists.txt index a02a538e17..eac1a0894f 100644 --- a/regression/CMakeLists.txt +++ b/regression/CMakeLists.txt @@ -23,3 +23,4 @@ add_subdirectory(regression) add_subdirectory(stationlist) add_subdirectory(gs) + add_subdirectory(gs_compat) diff --git a/regression/gs_compat/CMakeLists.txt b/regression/gs_compat/CMakeLists.txt new file mode 100644 index 0000000000..e58fb9ba0c --- /dev/null +++ b/regression/gs_compat/CMakeLists.txt @@ -0,0 +1,7 @@ +include(CreateRegression) +create_regression("game" + ${CMAKE_CURRENT_SOURCE_DIR}/info.nut + ${CMAKE_CURRENT_SOURCE_DIR}/main.nut + ${CMAKE_CURRENT_SOURCE_DIR}/result.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test.sav +) diff --git a/regression/gs_compat/info.nut b/regression/gs_compat/info.nut new file mode 100644 index 0000000000..4c407a7886 --- /dev/null +++ b/regression/gs_compat/info.nut @@ -0,0 +1,13 @@ +class CompatRegression extends GSInfo { + function GetAuthor() { return "OpenTTD GS Developers Team"; } + function GetName() { return "Compat Regression"; } + function GetShortName() { return "REGC"; } + function GetDescription() { return "This runs regression on the compat scripts."; } + function GetVersion() { return 1; } + function GetAPIVersion() { return "1.2"; } + function GetDate() { return "2026-05-19"; } + function CreateInstance() { return "CompatRegression"; } + function UseAsRandomAI() { return false; } +} + +RegisterGS(CompatRegression()); diff --git a/regression/gs_compat/main.nut b/regression/gs_compat/main.nut new file mode 100644 index 0000000000..f7c10eff53 --- /dev/null +++ b/regression/gs_compat/main.nut @@ -0,0 +1,6 @@ +class CompatRegression extends GSController { + function Start() + { + print("Done..."); + } +}; diff --git a/regression/gs_compat/result.txt b/regression/gs_compat/result.txt new file mode 100644 index 0000000000..87b3caffb4 --- /dev/null +++ b/regression/gs_compat/result.txt @@ -0,0 +1,2 @@ +Done... +ERROR: The script died unexpectedly. diff --git a/regression/gs_compat/test.sav b/regression/gs_compat/test.sav new file mode 100644 index 0000000000..45610f05e3 Binary files /dev/null and b/regression/gs_compat/test.sav differ