1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00

FileError for INI

This commit is contained in:
Henry Fredrick Schreiner 2017-03-08 09:42:56 -05:00
parent 58655472f7
commit a9c564c38a

View File

@ -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) {
TempFile tmpini{"TestIniTmp.ini"};
app.add_config("--config", tmpini);
app.add_config("--config", tmpini, "", true);
{
std::ofstream out{tmpini};