2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-27 12:31:50 +00:00

chore: add simple iw3 system test

This commit is contained in:
Jan Laupetin
2025-12-23 12:49:49 +01:00
parent a1693b2eb8
commit 5f04decacc
11 changed files with 102 additions and 6 deletions

View File

@@ -0,0 +1,45 @@
#include "Linker.h"
#include "OatTestPaths.h"
#include "SystemTestsPaths.h"
#include <catch2/catch_test_macros.hpp>
#include <format>
#include <memory>
#include <string>
using namespace std::literals;
namespace
{
TEST_CASE("Simple Zone(IW3)", "[iw3][system][simple]")
{
const auto assetSearchPath = oat::paths::GetSystemTestsDirectory() / "Game/IW3/simple";
const auto sourceSearchPath = oat::paths::GetSystemTestsDirectory() / "Game/IW3/simple";
const auto outputPath = oat::paths::GetTempDirectory("iw3_simple");
const char* argStrings[]{
"SystemTests", // bin
"--verbose",
"--asset-search-path",
assetSearchPath.c_str(),
"--source-search-path",
sourceSearchPath.c_str(),
"--output-folder",
outputPath.c_str(),
"SimpleZoneIW3",
};
LinkerArgs args;
bool shouldContinue = true;
const auto couldParseArgs = args.ParseArgs(std::extent_v<decltype(argStrings)>, argStrings, shouldContinue);
REQUIRE(couldParseArgs);
REQUIRE(shouldContinue);
const auto linker = Linker::Create(std::move(args));
const auto linkerResult = linker->Start();
REQUIRE(linkerResult);
}
} // namespace

View File

@@ -0,0 +1 @@
This is a simple zone.

View File

@@ -0,0 +1,4 @@
>game,IW3
rawfile,SimpleZone.txt