added test option flag
3d19b85 parent: 371d0e7 modified
app/src/main.cpp +3 -6 | @@ -147,14 +147,11 @@ auto runConsoleApp() -> void { | ||
| 147 | 147 | |
| 148 | 148 | auto handleFlags(std::vector<std::string> flags) -> void { |
| 149 | 149 | for (const auto& flag : flags) { |
| 150 | - if (flag == "--version") { | |
| 151 | - std::cout << "fluffy v0.1.1" << std::endl; | |
| 152 | - } | |
| 153 | - else if (flag == "--help") { | |
| 154 | - std::cout << "help" << std::endl; | |
| 150 | + if (flag == "-test") { | |
| 151 | + std::cout << "hello!" << std::endl; | |
| 155 | 152 | } |
| 156 | 153 | else { |
| 157 | - std::cout << "fluffy: '" << flag << "' is not a fluffy command. See 'fluffy --help'" << std::endl; | |
| 154 | + std::cout << "unkown option: '" << flag << "'" << std::endl; | |
| 158 | 155 | } |
| 159 | 156 | } |
| 160 | 157 | } |
| @@ -147,14 +147,11 @@ auto runConsoleApp() -> void { | |||
| 147 | 147 | ||
| 148 | auto handleFlags(std::vector<std::string> flags) -> void { | 148 | auto handleFlags(std::vector<std::string> flags) -> void { |
| 149 | for (const auto& flag : flags) { | 149 | for (const auto& flag : flags) { |
| 150 | - if (flag == "--version") { | 150 | + if (flag == "-test") { |
| 151 | - std::cout << "fluffy v0.1.1" << std::endl; | 151 | + std::cout << "hello!" << std::endl; |
| 152 | - } | ||
| 153 | - else if (flag == "--help") { | ||
| 154 | - std::cout << "help" << std::endl; | ||
| 155 | } | 152 | } |
| 156 | else { | 153 | else { |
| 157 | - std::cout << "fluffy: '" << flag << "' is not a fluffy command. See 'fluffy --help'" << std::endl; | 154 | + std::cout << "unkown option: '" << flag << "'" << std::endl; |
| 158 | } | 155 | } |
| 159 | } | 156 | } |
| 160 | } | 157 | } |