mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
Add some extra tests
The behaviour here is unchanged, but was previously untested.
This commit is contained in:
parent
7fb5b773dd
commit
18869c2c75
@ -272,6 +272,24 @@ namespace
|
||||
EXPECT_EQ(variables["load-savegame"].as<boost::filesystem::path>().string(), "");
|
||||
}
|
||||
|
||||
TEST(OpenMWOptionsFromConfig, should_ignore_whitespace_prefixed_commented_option)
|
||||
{
|
||||
bpo::options_description description = makeOptionsDescription();
|
||||
std::istringstream stream(" \t#load-savegame=save.omwsave");
|
||||
bpo::variables_map variables;
|
||||
Files::parseConfig(stream, variables, description);
|
||||
EXPECT_EQ(variables["load-savegame"].as<boost::filesystem::path>().string(), "");
|
||||
}
|
||||
|
||||
TEST(OpenMWOptionsFromConfig, should_support_whitespace_around_option)
|
||||
{
|
||||
bpo::options_description description = makeOptionsDescription();
|
||||
std::istringstream stream(" load-savegame = save.omwsave ");
|
||||
bpo::variables_map variables;
|
||||
Files::parseConfig(stream, variables, description);
|
||||
EXPECT_EQ(variables["load-savegame"].as<boost::filesystem::path>().string(), "save.omwsave");
|
||||
}
|
||||
|
||||
TEST(OpenMWOptionsFromConfig, should_throw_on_multiple_load_savegame)
|
||||
{
|
||||
bpo::options_description description = makeOptionsDescription();
|
||||
|
Loading…
Reference in New Issue
Block a user