Include all tests in default list

Otherwise the tests aren't very discoverable.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate
2025-02-07 02:37:19 +02:00
parent e57f22db01
commit c235a11a86
12 changed files with 60 additions and 60 deletions

View File

@@ -5,7 +5,7 @@
#include <iostream>
TEST_CASE("Backups are created", "[.backup]")
TEST_CASE("Backups are created", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -25,7 +25,7 @@ TEST_CASE("Backups are created", "[.backup]")
verifyDirsAreEqual(DATA_DIR / "app" / "a", DATA_DIR / "app" / "a.4.lmmbakman", true);
}
TEST_CASE("Backups are activated", "[.backup]")
TEST_CASE("Backups are activated", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -58,7 +58,7 @@ TEST_CASE("Backups are activated", "[.backup]")
DATA_DIR / "target" / "bak_man" / "change_bak" / "a", DATA_DIR / "app" / "a.1.lmmbakman", true);
}
TEST_CASE("Backups are removed", "[.backup]")
TEST_CASE("Backups are removed", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -78,7 +78,7 @@ TEST_CASE("Backups are removed", "[.backup]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "bak_man" / "remove_bak_2");
}
TEST_CASE("Profiles are working", "[.backup]")
TEST_CASE("Profiles are working", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -118,7 +118,7 @@ TEST_CASE("Profiles are working", "[.backup]")
DATA_DIR / "target" / "bak_man" / "profiles_1" / "a-Fil _3");
}
TEST_CASE("State is saved", "[.backup]")
TEST_CASE("State is saved", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -154,7 +154,7 @@ TEST_CASE("State is saved", "[.backup]")
DATA_DIR / "target" / "bak_man" / "profiles_0" / "a-Fil _3");
}
TEST_CASE("Invalid state is repaired", "[.backup]")
TEST_CASE("Invalid state is repaired", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -174,7 +174,7 @@ TEST_CASE("Invalid state is repaired", "[.backup]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "bak_man" / "invalid_state");
}
TEST_CASE("Targets are removed", "[.backup]")
TEST_CASE("Targets are removed", "[backup]")
{
resetAppDir();
BackupManager bak_man;
@@ -192,7 +192,7 @@ TEST_CASE("Targets are removed", "[.backup]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "source" / "app", true);
}
TEST_CASE("Backups are overwritten", "[.backup]")
TEST_CASE("Backups are overwritten", "[backup]")
{
resetAppDir();
BackupManager bak_man;

View File

@@ -17,7 +17,7 @@ void resetBg3Files()
sfs::copy(source, target);
}
TEST_CASE("Plugins are found", "[.bg3]")
TEST_CASE("Plugins are found", "[bg3]")
{
resetBg3Files();
@@ -39,7 +39,7 @@ TEST_CASE("Plugins are found", "[.bg3]")
DATA_DIR / "target" / "bg3" / "1" / "modsettings.lsx");
}
TEST_CASE("Loadorder can be modified", "[.bg3]")
TEST_CASE("Loadorder can be modified", "[bg3]")
{
resetBg3Files();
@@ -63,7 +63,7 @@ TEST_CASE("Loadorder can be modified", "[.bg3]")
REQUIRE_THAT(depl.getModNames(), Catch::Matchers::Equals(depl_2.getModNames()));
}
TEST_CASE("Profiles are managed", "[.bg3]")
TEST_CASE("Profiles are managed", "[bg3]")
{
resetBg3Files();

View File

@@ -16,7 +16,7 @@ std::string generateRandomString(std::default_random_engine& e)
return str;
}
TEST_CASE("String are encrypted", "[.crypto]")
TEST_CASE("String are encrypted", "[crypto]")
{
std::random_device r;
std::default_random_engine e(r());

View File

@@ -8,7 +8,7 @@
#include <ranges>
TEST_CASE("Mods are added and removed", "[.deployer]")
TEST_CASE("Mods are added and removed", "[deployer]")
{
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
depl.addProfile();
@@ -18,7 +18,7 @@ TEST_CASE("Mods are added and removed", "[.deployer]")
REQUIRE(depl.getNumMods() == 0);
}
TEST_CASE("Mods are being deployed", "[.deployer]")
TEST_CASE("Mods are being deployed", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -28,7 +28,7 @@ TEST_CASE("Mods are being deployed", "[.deployer]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "mod1", true);
}
TEST_CASE("Mod status works", "[.deployer]")
TEST_CASE("Mod status works", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -41,7 +41,7 @@ TEST_CASE("Mod status works", "[.deployer]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "mod1", true);
}
TEST_CASE("Deployed mods are removed", "[.deployer]")
TEST_CASE("Deployed mods are removed", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -53,7 +53,7 @@ TEST_CASE("Deployed mods are removed", "[.deployer]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "source" / "app", true);
}
TEST_CASE("Conflicts are resolved", "[.deployer]")
TEST_CASE("Conflicts are resolved", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -65,7 +65,7 @@ TEST_CASE("Conflicts are resolved", "[.deployer]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "mod012", true);
}
TEST_CASE("Files are restored", "[.deployer]")
TEST_CASE("Files are restored", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -81,7 +81,7 @@ TEST_CASE("Files are restored", "[.deployer]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "source" / "app", true);
}
TEST_CASE("Loadorder is being changed", "[.deployer]")
TEST_CASE("Loadorder is being changed", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -95,7 +95,7 @@ TEST_CASE("Loadorder is being changed", "[.deployer]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "mod012", true);
}
TEST_CASE("Profiles", "[.deployer]")
TEST_CASE("Profiles", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
@@ -119,7 +119,7 @@ TEST_CASE("Profiles", "[.deployer]")
}
}
TEST_CASE("Get mod conflicts", "[.deployer]")
TEST_CASE("Get mod conflicts", "[deployer]")
{
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
depl.addProfile();
@@ -135,7 +135,7 @@ TEST_CASE("Get mod conflicts", "[.deployer]")
REQUIRE(conflicts.contains(0));
}
TEST_CASE("Get file conflicts", "[.deployer]")
TEST_CASE("Get file conflicts", "[deployer]")
{
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "");
depl.addProfile();
@@ -148,7 +148,7 @@ TEST_CASE("Get file conflicts", "[.deployer]")
REQUIRE(conflicts.size() == 3);
}
TEST_CASE("Conflict groups are created", "[.deployer]")
TEST_CASE("Conflict groups are created", "[deployer]")
{
Deployer depl(DATA_DIR / "source" / "conflicts", DATA_DIR / "app", "");
depl.addProfile();
@@ -161,7 +161,7 @@ TEST_CASE("Conflict groups are created", "[.deployer]")
std::vector<std::vector<int>>{ { 0, 1, 2, 3, 5 }, { 4, 6 }, { 7 } }));
}
TEST_CASE("Mods are sorted", "[.deployer]")
TEST_CASE("Mods are sorted", "[deployer]")
{
Deployer depl(DATA_DIR / "source" / "conflicts", DATA_DIR / "app", "");
depl.addProfile();
@@ -179,7 +179,7 @@ TEST_CASE("Mods are sorted", "[.deployer]")
{ 7, true } }));
}
TEST_CASE("Case matching deployer", "[.deployer]")
TEST_CASE("Case matching deployer", "[deployer]")
{
resetAppDir();
sfs::remove_all(DATA_DIR / "source" / "case_matching" / "0");
@@ -204,7 +204,7 @@ TEST_CASE("Case matching deployer", "[.deployer]")
false);
}
TEST_CASE("External changes are handeld", "[.deployer]")
TEST_CASE("External changes are handeld", "[deployer]")
{
resetAppDir();
resetStagingDir();
@@ -253,7 +253,7 @@ TEST_CASE("External changes are handeld", "[.deployer]")
REQUIRE(sfs::equivalent(DATA_DIR / "staging" / "2" / "0.txt", DATA_DIR / "app" / "0.txt"));
}
TEST_CASE("Files are deployed as sym links", "[.deployer]")
TEST_CASE("Files are deployed as sym links", "[deployer]")
{
resetAppDir();
Deployer depl = Deployer(DATA_DIR / "source", DATA_DIR / "app", "", Deployer::sym_link);

View File

@@ -2,7 +2,7 @@
#include "test_utils.h"
#include <catch2/catch_test_macros.hpp>
TEST_CASE("Required files are detected", "[.fomod]")
TEST_CASE("Required files are detected", "[fomod]")
{
fomod::FomodInstaller installer;
installer.init(DATA_DIR / "source" / "fomod" / "fomod" / "simple.xml");
@@ -16,7 +16,7 @@ TEST_CASE("Required files are detected", "[.fomod]")
REQUIRE_THAT(files, Catch::Matchers::Equals(target));
}
TEST_CASE("Steps are executed", "[.fomod]")
TEST_CASE("Steps are executed", "[fomod]")
{
fomod::FomodInstaller installer;
installer.init(DATA_DIR / "source" / "fomod" / "fomod" / "steps.xml");
@@ -44,7 +44,7 @@ TEST_CASE("Steps are executed", "[.fomod]")
REQUIRE_THAT(result, Catch::Matchers::Equals(target));
}
TEST_CASE("Installation matrix is parsed", "[.fomod]")
TEST_CASE("Installation matrix is parsed", "[fomod]")
{
fomod::FomodInstaller installer;
installer.init(DATA_DIR / "source" / "fomod" / "fomod" / "matrix.xml");

View File

@@ -6,14 +6,14 @@
#include <vector>
TEST_CASE("Files are extracted", "[.installer]")
TEST_CASE("Files are extracted", "[installer]")
{
resetStagingDir();
Installer::extract(DATA_DIR / "source" / "mod0.tar.gz", DATA_DIR / "staging" / "extract");
verifyDirsAreEqual(DATA_DIR / "source" / "0", DATA_DIR / "staging" / "extract");
}
TEST_CASE("Mods are (un)installed", "[.installer]")
TEST_CASE("Mods are (un)installed", "[installer]")
{
resetStagingDir();
Installer::install(DATA_DIR / "source" / "mod0.tar.gz",
@@ -29,7 +29,7 @@ TEST_CASE("Mods are (un)installed", "[.installer]")
}
}
TEST_CASE("Installer options", "[.installer]")
TEST_CASE("Installer options", "[installer]")
{
resetStagingDir();
SECTION("Upper case conversion")
@@ -62,7 +62,7 @@ TEST_CASE("Installer options", "[.installer]")
}
}
TEST_CASE("Root levels", "[.installer]")
TEST_CASE("Root levels", "[installer]")
{
resetStagingDir();
SECTION("Level 0")

View File

@@ -17,7 +17,7 @@ void resetFiles()
}
TEST_CASE("State is read", "[.loot]")
TEST_CASE("State is read", "[loot]")
{
resetFiles();
LootDeployer depl(
@@ -30,7 +30,7 @@ TEST_CASE("State is read", "[.loot]")
std::vector<std::tuple<int, bool>>{ { -1, true }, { -1, false }, { -1, true }, { -1, true } }));
}
TEST_CASE("Load order can be edited", "[.loot]")
TEST_CASE("Load order can be edited", "[loot]")
{
resetFiles();
LootDeployer depl(
@@ -50,7 +50,7 @@ TEST_CASE("Load order can be edited", "[.loot]")
REQUIRE_THAT(depl.getLoadorder(), Catch::Matchers::Equals(depl2.getLoadorder()));
}
TEST_CASE("Profiles are managed", "[.loot]")
TEST_CASE("Profiles are managed", "[loot]")
{
resetFiles();
LootDeployer depl(

View File

@@ -10,7 +10,7 @@
const int INSTALLER_FLAGS = Installer::preserve_case | Installer::preserve_directories;
TEST_CASE("Mods are installed", "[.app]")
TEST_CASE("Mods are installed", "[app]")
{
resetStagingDir();
ModdedApplication app(DATA_DIR / "staging", "test");
@@ -40,7 +40,7 @@ TEST_CASE("Mods are installed", "[.app]")
REQUIRE(mod_info[0].mod.name == "mod 0->2");
}
TEST_CASE("Deployers are added", "[.app]")
TEST_CASE("Deployers are added", "[app]")
{
resetStagingDir();
resetAppDir();
@@ -65,7 +65,7 @@ TEST_CASE("Deployers are added", "[.app]")
verifyDirsAreEqual(DATA_DIR / "app", DATA_DIR / "target" / "mod012", true);
}
TEST_CASE("State is saved", "[.app]")
TEST_CASE("State is saved", "[app]")
{
resetStagingDir();
resetAppDir();
@@ -111,7 +111,7 @@ TEST_CASE("State is saved", "[.app]")
sfs::remove_all(DATA_DIR / "app_2");
}
TEST_CASE("Groups update loadorders", "[.app]")
TEST_CASE("Groups update loadorders", "[app]")
{
resetStagingDir();
ModdedApplication app(DATA_DIR / "staging", "test");
@@ -148,7 +148,7 @@ TEST_CASE("Groups update loadorders", "[.app]")
Catch::Matchers::Equals(std::vector<std::tuple<int, bool>>{ { 2, true } }));
}
TEST_CASE("Mods are split", "[.app]")
TEST_CASE("Mods are split", "[app]")
{
resetStagingDir();
ModdedApplication app(DATA_DIR / "staging", "test");
@@ -188,7 +188,7 @@ TEST_CASE("Mods are split", "[.app]")
verifyDirsAreEqual(DATA_DIR / "staging", DATA_DIR / "target" / "split");
}
TEST_CASE("Mods are uninstalled", "[.app]")
TEST_CASE("Mods are uninstalled", "[app]")
{
resetStagingDir();
ModdedApplication app(DATA_DIR / "staging", "test");

View File

@@ -23,7 +23,7 @@ void resetOpenMwFiles()
sfs::copy(target_source, target_target);
}
TEST_CASE("State is read", "[.openmw]")
TEST_CASE("State is read", "[openmw]")
{
resetOpenMwFiles();
@@ -58,7 +58,7 @@ TEST_CASE("State is read", "[.openmw]")
verifyFilesAreEqual(DATA_DIR / "target" / "openmw" / "target" / "openmw.cfg", DATA_DIR / "target" / "openmw" / "0" / "openmw.cfg");
}
TEST_CASE("Load order can be edited", "[.openmw]")
TEST_CASE("Load order can be edited", "[openmw]")
{
resetOpenMwFiles();
@@ -99,7 +99,7 @@ TEST_CASE("Load order can be edited", "[.openmw]")
REQUIRE_THAT(p_depl.getLoadorder(), Catch::Matchers::Equals(p_depl_2.getLoadorder()));
}
TEST_CASE("Profiles are managed", "[.openmw]")
TEST_CASE("Profiles are managed", "[openmw]")
{
resetOpenMwFiles();

View File

@@ -34,7 +34,7 @@ std::vector<std::string> files_to_be_ignored = {
(sfs::path("c") / "3").string()
};
TEST_CASE("Ignored files are updated", "[.revdepl]")
TEST_CASE("Ignored files are updated", "[revdepl]")
{
resetDirs();
ReverseDeployer depl(DATA_DIR / "source" / "revdepl" / "source",
@@ -56,7 +56,7 @@ TEST_CASE("Ignored files are updated", "[.revdepl]")
Catch::Matchers::UnorderedEquals(files_to_be_ignored));
}
TEST_CASE("Managed files are updated", "[.revdepl]")
TEST_CASE("Managed files are updated", "[revdepl]")
{
// No extra files
resetDirs();
@@ -86,7 +86,7 @@ TEST_CASE("Managed files are updated", "[.revdepl]")
Catch::Matchers::UnorderedEquals(managed_target));
}
TEST_CASE("Deployed files are ignored", "[.revdepl]")
TEST_CASE("Deployed files are ignored", "[revdepl]")
{
resetDirs();
Deployer depl(DATA_DIR / "source" / "revdepl" / "data",
@@ -149,7 +149,7 @@ TEST_CASE("Deployed files are ignored", "[.revdepl]")
Catch::Matchers::UnorderedEquals(new_ignored_target));
}
TEST_CASE("Managed files are deployed", "[.revdepl]")
TEST_CASE("Managed files are deployed", "[revdepl]")
{
resetDirs();
Deployer depl(DATA_DIR / "source" / "revdepl" / "data",

View File

@@ -4,7 +4,7 @@
#include <catch2/catch_test_macros.hpp>
TEST_CASE("Expressions are validated", "[.tags]")
TEST_CASE("Expressions are validated", "[tags]")
{
REQUIRE_FALSE(TagConditionNode::expressionIsValid("", 1));
REQUIRE_FALSE(TagConditionNode::expressionIsValid("and", 1));
@@ -37,7 +37,7 @@ TEST_CASE("Expressions are validated", "[.tags]")
REQUIRE(TagConditionNode::expressionIsValid("not(not0) and (1) or 2", 3));
}
TEST_CASE("Single node detects files", "[.tags]")
TEST_CASE("Single node detects files", "[tags]")
{
std::vector<TagCondition> conditions{
{ false, TagCondition::Type::file_name, false, "*.txt" },
@@ -80,7 +80,7 @@ TEST_CASE("Single node detects files", "[.tags]")
REQUIRE_FALSE(node_7.evaluate(files.at(1)));
}
TEST_CASE("Expressions of depth 1 are parsed", "[.tags]")
TEST_CASE("Expressions of depth 1 are parsed", "[tags]")
{
std::vector<TagCondition> conditions{ { false, TagCondition::Type::file_name, false, "*.txt" },
{ false, TagCondition::Type::file_name, false, "*12*abc" },
@@ -98,7 +98,7 @@ TEST_CASE("Expressions of depth 1 are parsed", "[.tags]")
REQUIRE(node2.evaluate(files.at(1)));
}
TEST_CASE("Complex expressions are parsed", "[.tags]")
TEST_CASE("Complex expressions are parsed", "[tags]")
{
std::vector<TagCondition> conditions{
{ false, TagCondition::Type::file_name, false, "*.txt" },

View File

@@ -2,7 +2,7 @@
#include <catch2/catch_test_macros.hpp>
TEST_CASE("Overwrite commands are generated", "[.tool]")
TEST_CASE("Overwrite commands are generated", "[tool]")
{
const std::string command_string = "my command string";
Tool tool("t", "", command_string);
@@ -11,7 +11,7 @@ TEST_CASE("Overwrite commands are generated", "[.tool]")
REQUIRE(tool.getCommand(true) == "flatpak-spawn --host " + command_string);
}
TEST_CASE("Native commands are generated", "[.tool]")
TEST_CASE("Native commands are generated", "[tool]")
{
Tool tool_1("t1", "", "prog", "", {}, "");
REQUIRE(tool_1.getCommand(false) == R"("prog")");
@@ -25,7 +25,7 @@ TEST_CASE("Native commands are generated", "[.tool]")
REQUIRE(tool_4.getCommand(true) == R"(flatpak-spawn --host --directory="/tmp" --env=VAR_1="VAL_1" --env=VAR_2="VAL_2" "/bin/prog" -v -a 2)");
}
TEST_CASE("Wine commands are generated", "[.tool]")
TEST_CASE("Wine commands are generated", "[tool]")
{
Tool tool_1("t1", "", "/bin/prog.exe", "", "", {}, "");
REQUIRE(tool_1.getCommand(false) == R"(wine "/bin/prog.exe")");
@@ -35,7 +35,7 @@ TEST_CASE("Wine commands are generated", "[.tool]")
REQUIRE(tool_2.getCommand(true) == R"(flatpak-spawn --host --directory="/tmp" --env=VAR_1="VAL_1" --env=WINEPREFIX="/tmp/wine_prefix" wine "/bin/prog.exe" -b)");
}
TEST_CASE("Protontricks commands are generated", "[.tool]")
TEST_CASE("Protontricks commands are generated", "[tool]")
{
Tool tool_1("t1", "", "/bin/prog.exe", false, 220, "/tmp", {{"VAR_1", "VAL_1"}}, "-arg", "-parg");
REQUIRE(tool_1.getCommand(false) == R"(cd "/tmp"; VAR_1="VAL_1" protontricks-launch --appid 220 -parg "/bin/prog.exe" -arg)");
@@ -45,7 +45,7 @@ TEST_CASE("Protontricks commands are generated", "[.tool]")
R"(flatpak run --command=protontricks-launch com.github.Matoking.protontricks --appid 220 -parg "/bin/prog.exe" -arg)");
}
TEST_CASE("Steam commands are generated", "[.tool]")
TEST_CASE("Steam commands are generated", "[tool]")
{
Tool tool_1("t1", "", 220, false);
REQUIRE(tool_1.getCommand(false) == "steam -applaunch 220");
@@ -54,7 +54,7 @@ TEST_CASE("Steam commands are generated", "[.tool]")
REQUIRE(tool_2.getCommand(true) == "flatpak-spawn --host flatpak run com.valvesoftware.Steam -applaunch 220");
}
TEST_CASE("State is serialized", "[.tool]")
TEST_CASE("State is serialized", "[tool]")
{
std::vector<Tool> tools =
{