add t command for quick testing, in standalone mode

This commit is contained in:
proddy
2020-10-19 23:16:37 +02:00
parent 6e7728a5f7
commit ef7a415742

View File

@@ -494,6 +494,20 @@ void Console::load_standard_commands(unsigned int context) {
});
#endif
#if defined(EMSESP_STANDALONE)
EMSESPShell::commands->add_command(context,
CommandFlags::USER,
flash_string_vector{F("t")},
flash_string_vector{F_(name_optional)},
[](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
if (arguments.size() == 0) {
Test::run_test(shell, "default");
} else {
Test::run_test(shell, arguments.front());
}
});
#endif
EMSESPShell::commands->add_command(
context,
CommandFlags::USER,