From 9e72bef4803e942d25600492d8f376547706ba51 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 28 Apr 2024 14:38:01 +0200 Subject: [PATCH] show help text for add command --- src/test/test.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/test.cpp b/src/test/test.cpp index f24fae67c..aadb7d35f 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -299,9 +299,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const bool ok = false; + // e.g. "test add 0x10 172" if (command == "add") { + if (id1 == -1 || id2 == -1) { + shell.printfln("Usage: test add "); + return; + } shell.printfln("Testing Adding a device (product_id %d), with all values...", id2); - test("add", id1, id2); // e.g. "test add 0x8 172" + test("add", id1, id2); shell.invoke_command("show values"); ok = true; }