error handling in tests

This commit is contained in:
Proddy
2023-01-12 17:38:50 +01:00
parent 754f4e8244
commit 3e4f7fdc17
3 changed files with 90 additions and 69 deletions

View File

@@ -154,18 +154,6 @@ static void setup_commands(std::shared_ptr<Commands> & commands) {
Test::run_test(shell, arguments[0].c_str(), arguments[1].c_str());
}
});
commands->add_command(ShellContext::MAIN,
CommandFlags::USER,
string_vector{F_(debug)},
string_vector{F_(name_optional)},
[](Shell & shell, const std::vector<std::string> & arguments) {
if (arguments.empty()) {
Test::debug(shell, "default");
} else {
Test::debug(shell, arguments.front());
}
});
#endif
commands->add_command(ShellContext::MAIN, CommandFlags::USER, string_vector{F_(su)}, [=](Shell & shell, const std::vector<std::string> & arguments) {