change root_config test data
This commit is contained in:
@@ -2,13 +2,15 @@ mod_location = "mods"
|
|||||||
download_location = "downloads"
|
download_location = "downloads"
|
||||||
nexus_api_key = "1234"
|
nexus_api_key = "1234"
|
||||||
|
|
||||||
[games.sse]
|
[games.example_game]
|
||||||
path = "/home/user/games/sse"
|
path = "/home/user/games/sse"
|
||||||
|
|
||||||
|
[games.sse]
|
||||||
|
path = "games/sse"
|
||||||
|
|
||||||
[instances.example1]
|
[instances.example1]
|
||||||
path = "example1.toml"
|
path = "example1.toml"
|
||||||
|
|
||||||
|
|
||||||
[instances.example2]
|
[instances.example2]
|
||||||
path = "/home/user/example2.toml"
|
path = "/home/user/example2.toml"
|
||||||
|
|
||||||
@@ -26,3 +28,6 @@ path = "mod2"
|
|||||||
|
|
||||||
[mods.mod3]
|
[mods.mod3]
|
||||||
path = "mod3"
|
path = "mod3"
|
||||||
|
|
||||||
|
[mods.add_test_1]
|
||||||
|
path = "add_test_1"
|
||||||
|
|||||||
@@ -34,11 +34,18 @@ fn parse_complex() {
|
|||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
config
|
config
|
||||||
.game_by_id("sse")
|
.game_by_id("example_game")
|
||||||
.is_some_and(|e| e.install_location() == "/home/user/games/sse"),
|
.is_some_and(|e| e.install_location() == "/home/user/games/sse"),
|
||||||
"Installed game wrong path"
|
"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.game_by_id("starfield").is_none());
|
||||||
|
|
||||||
assert!(config.mod_by_id("mod1").is_some());
|
assert!(config.mod_by_id("mod1").is_some());
|
||||||
|
|||||||
Reference in New Issue
Block a user