mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
test function changes
This commit is contained in:
@@ -20,9 +20,7 @@
|
|||||||
#include "emsesp.h"
|
#include "emsesp.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#if defined(EMSESP_DEBUG)
|
|
||||||
#include "test/test.h"
|
#include "test/test.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
@@ -494,28 +492,20 @@ void Console::load_standard_commands(unsigned int context) {
|
|||||||
#if defined(EMSESP_DEBUG)
|
#if defined(EMSESP_DEBUG)
|
||||||
EMSESPShell::commands->add_command(context,
|
EMSESPShell::commands->add_command(context,
|
||||||
CommandFlags::USER,
|
CommandFlags::USER,
|
||||||
flash_string_vector{F_(test)},
|
flash_string_vector{F("test")},
|
||||||
flash_string_vector{F_(name_optional)},
|
flash_string_vector{F_(name_optional)},
|
||||||
[](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
|
[](Shell & shell, const std::vector<std::string> & arguments) {
|
||||||
if (arguments.size() == 0) {
|
if (arguments.size() == 0) {
|
||||||
Test::run_test(shell, "default");
|
Test::run_test(shell, "default");
|
||||||
} else {
|
} else {
|
||||||
Test::run_test(shell, arguments.front());
|
Test::run_test(shell, arguments.front());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(EMSESP_STANDALONE)
|
|
||||||
EMSESPShell::commands->add_command(context,
|
EMSESPShell::commands->add_command(context,
|
||||||
CommandFlags::USER,
|
CommandFlags::USER,
|
||||||
flash_string_vector{F("t")},
|
flash_string_vector{F("t")},
|
||||||
flash_string_vector{F_(name_optional)},
|
|
||||||
[](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
|
[](Shell & shell, const std::vector<std::string> & arguments __attribute__((unused))) {
|
||||||
if (arguments.size() == 0) {
|
Test::run_test(shell, "default");
|
||||||
Test::run_test(shell, "default");
|
|
||||||
} else {
|
|
||||||
Test::run_test(shell, arguments.front());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user