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:
45
test/SystemTests/Game/IW3/SimpleZoneIW3.cpp
Normal file
45
test/SystemTests/Game/IW3/SimpleZoneIW3.cpp
Normal 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
|
||||
1
test/SystemTests/Game/IW3/simple/SimpleZone.txt
Normal file
1
test/SystemTests/Game/IW3/simple/SimpleZone.txt
Normal file
@@ -0,0 +1 @@
|
||||
This is a simple zone.
|
||||
4
test/SystemTests/Game/IW3/simple/SimpleZoneIW3.zone
Normal file
4
test/SystemTests/Game/IW3/simple/SimpleZoneIW3.zone
Normal file
@@ -0,0 +1,4 @@
|
||||
>game,IW3
|
||||
|
||||
rawfile,SimpleZone.txt
|
||||
|
||||
Reference in New Issue
Block a user