mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 20:23:55 +00:00
31 lines
453 B
C++
31 lines
453 B
C++
#ifdef CLI_SINGLE_FILE
|
|
#include "CLI11.hpp"
|
|
#else
|
|
#include "CLI/CLI.hpp"
|
|
#endif
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
typedef std::vector<std::string> input_t;
|
|
|
|
TEST(Basic, Empty) {
|
|
|
|
{
|
|
CLI::App app;
|
|
input_t simpleput;
|
|
app.parse(simpleput);
|
|
}
|
|
{
|
|
CLI::App app;
|
|
input_t spare = {"spare"};
|
|
EXPECT_THROW(app.parse(spare), CLI::PositionalError);
|
|
}
|
|
{
|
|
CLI::App app;
|
|
input_t simpleput;
|
|
app.parse(simpleput);
|
|
}
|
|
}
|
|
|
|
|