mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-01 13:13:53 +00:00
* Add the beginnings of a fuzzing system for CLI11. This commit adds the fuzzing code, a simple test, and two fixes to issues(seg faults) found by the initial round of fuzzing. It also adds a few tests and coverage issues uncovered in the process of developing the fuzz tests. As a side effect adjusts some of the azure tests to specify the vmImage which was being changed on azure. * update license to match rest of code base --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
25 lines
576 B
C++
25 lines
576 B
C++
// Copyright (c) 2017-2023, University of Cincinnati, developed by Henry Schreiner
|
|
// under NSF AWARD 1414736 and by the respective contributors.
|
|
// All rights reserved.
|
|
//
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
#include "fuzzApp.hpp"
|
|
#include <CLI/CLI.hpp>
|
|
#include <iostream>
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
CLI::FuzzApp fuzzdata;
|
|
|
|
auto app = fuzzdata.generateApp();
|
|
try {
|
|
|
|
app->parse(argc, argv);
|
|
} catch(const CLI::ParseError &e) {
|
|
(app)->exit(e);
|
|
// this just indicates we caught an error known by CLI
|
|
}
|
|
return 0;
|
|
}
|