Test: Add upstream tests

This commit is contained in:
Jonathan G Rennison
2023-12-13 19:05:34 +00:00
parent 24c8a8f887
commit 34668bff87
25 changed files with 1216 additions and 141 deletions

View File

@@ -52,11 +52,6 @@
#endif
#if defined(__APPLE__)
# if defined(WITH_SDL)
/* the mac implementation needs this file included in the same file as main() */
# include <SDL.h>
# endif
# include "../macosx/macos.h"
#endif
@@ -229,40 +224,6 @@ void NORETURN DoOSAbort()
}
#endif
#ifdef WITH_COCOA
void CocoaSetupAutoreleasePool();
void CocoaReleaseAutoreleasePool();
#endif
int CDECL main(int argc, char *argv[])
{
/* Make sure our arguments contain only valid UTF-8 characters. */
for (int i = 0; i < argc; i++) StrMakeValidInPlace(argv[i]);
#ifdef WITH_COCOA
CocoaSetupAutoreleasePool();
/* This is passed if we are launched by double-clicking */
if (argc >= 2 && strncmp(argv[1], "-psn", 4) == 0) {
argv[1] = nullptr;
argc = 1;
}
#endif
PerThreadSetupInit();
CrashLog::InitialiseCrashLog();
SetRandomSeed(time(nullptr));
signal(SIGPIPE, SIG_IGN);
int ret = openttd_main(argc, argv);
#ifdef WITH_COCOA
CocoaReleaseAutoreleasePool();
#endif
return ret;
}
#ifndef WITH_COCOA
std::optional<std::string> GetClipboardContents()
{