change root_config test data

This commit is contained in:
2026-03-16 17:08:56 +01:00
parent 55f9e3f6d6
commit defc4a5721
2 changed files with 15 additions and 3 deletions

View File

@@ -2,13 +2,15 @@ mod_location = "mods"
download_location = "downloads"
nexus_api_key = "1234"
[games.sse]
[games.example_game]
path = "/home/user/games/sse"
[games.sse]
path = "games/sse"
[instances.example1]
path = "example1.toml"
[instances.example2]
path = "/home/user/example2.toml"
@@ -26,3 +28,6 @@ path = "mod2"
[mods.mod3]
path = "mod3"
[mods.add_test_1]
path = "add_test_1"

View File

@@ -34,11 +34,18 @@ fn parse_complex() {
assert!(
config
.game_by_id("sse")
.game_by_id("example_game")
.is_some_and(|e| e.install_location() == "/home/user/games/sse"),
"Installed game wrong path"
);
assert!(
config
.game_by_id("sse")
.is_some_and(|e| e.install_location().ends_with("games/sse")),
"Installed game wrong path"
);
assert!(config.game_by_id("starfield").is_none());
assert!(config.mod_by_id("mod1").is_some());