mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 04:33:53 +00:00
FileError for INI
This commit is contained in:
parent
58655472f7
commit
a9c564c38a
@ -199,11 +199,20 @@ TEST_F(TApp, IniNotRequired) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(TApp, IniRequiredNotFound) {
|
||||||
|
|
||||||
|
std::string noini = "TestIniNotExist.ini";
|
||||||
|
app.add_config("--config", noini, "", true);
|
||||||
|
|
||||||
|
EXPECT_THROW(run(), CLI::FileError);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(TApp, IniRequired) {
|
TEST_F(TApp, IniRequired) {
|
||||||
|
|
||||||
TempFile tmpini{"TestIniTmp.ini"};
|
TempFile tmpini{"TestIniTmp.ini"};
|
||||||
|
|
||||||
app.add_config("--config", tmpini);
|
app.add_config("--config", tmpini, "", true);
|
||||||
|
|
||||||
{
|
{
|
||||||
std::ofstream out{tmpini};
|
std::ofstream out{tmpini};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user