mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 20:23:55 +00:00
29 lines
485 B
C++
29 lines
485 B
C++
#ifdef CLI11_SINGLE_FILE
|
|
#include "CLI11.hpp"
|
|
#else
|
|
#include "CLI/CLI.hpp"
|
|
#endif
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
using input_t = std::vector<std::string>;
|
|
|
|
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::ExtrasError);
|
|
}
|
|
{
|
|
CLI::App app;
|
|
input_t simpleput;
|
|
app.parse(simpleput);
|
|
}
|
|
}
|