From ef7a415742c069b0cca31252fd50ea9455c53b79 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 19 Oct 2020 23:16:37 +0200 Subject: [PATCH] add t command for quick testing, in standalone mode --- src/console.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/console.cpp b/src/console.cpp index 061703cf7..035dca5bf 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -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 & 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,