| 1 | From ac7a0157ca8f6bee29c7b5a742c9992934a0546f Mon Sep 17 00:00:00 2001
|
| 2 | From: y5nw <y5nw@localhost>
|
| 3 | Date: Fri, 30 Jan 2026 20:05:19 +0100
|
| 4 | Subject: [PATCH] Unittests: skip translation test if devtest cannot be found
|
| 5 |
|
| 6 | ---
|
| 7 | src/unittest/test_translations.cpp | 3 ++-
|
| 8 | 1 file changed, 2 insertions(+), 1 deletion(-)
|
| 9 |
|
| 10 | diff --git a/src/unittest/test_translations.cpp b/src/unittest/test_translations.cpp
|
| 11 | index 96f5acb9b6b05..74140960bcb85 100644
|
| 12 | |
| 13 | |
| 14 | @@ -14,7 +14,8 @@
|
| 15 | static std::string read_translation_file(const std::string &filename)
|
| 16 | {
|
| 17 | auto gamespec = findSubgame("devtest");
|
| 18 | - REQUIRE(gamespec.isValid());
|
| 19 | + if(!gamespec.isValid())
|
| 20 | + SKIP("devtest not found");
|
| 21 | auto path = gamespec.gamemods_path + (DIR_DELIM "testtranslations" DIR_DELIM "test_locale" DIR_DELIM) + filename;
|
| 22 | std::string content;
|
| 23 | REQUIRE(fs::ReadFile(path, content));
|
| 24 |
|