Extended cli_handler test cases (#287)

This commit is contained in:
Bartek Kryza
2024-06-08 13:29:22 +02:00
parent beba7d16b9
commit 82846dcc27
4 changed files with 276 additions and 2 deletions

View File

@@ -389,6 +389,11 @@ runtime_config cli_handler::get_runtime_config() const
return cfg;
}
void cli_handler::set_config_path(const std::string &path)
{
config_path = path;
}
cli_flow_t cli_handler::print_version()
{
ostr_ << "clang-uml " << clanguml::version::CLANG_UML_VERSION << '\n';
@@ -477,7 +482,7 @@ cli_flow_t cli_handler::create_config_file()
{
namespace fs = std::filesystem;
fs::path config_file{"./.clang-uml"};
fs::path config_file{config_path};
if (fs::exists(config_file)) {
ostr_ << "ERROR: .clang-uml file already exists\n";

View File

@@ -153,6 +153,13 @@ public:
*/
runtime_config get_runtime_config() const;
/**
* @brief Set the default config path
*
* @param path
*/
void set_config_path(const std::string &path);
std::string config_path{".clang-uml"};
std::optional<std::string> compilation_database_dir{};
std::vector<std::string> diagram_names{};