diff --git a/tests/test_phase4.cpp b/tests/test_phase4.cpp index e2d663b..e2db731 100644 --- a/tests/test_phase4.cpp +++ b/tests/test_phase4.cpp @@ -5573,6 +5573,12 @@ void testConsoleInputModel() auto args = dragonx::ui::ParseConsoleCommandArgs("z_sendmany \"from addr\" [{\"address\":\"zs\",\"amount\":1.25}] true"); EXPECT_EQ(args.size(), static_cast(4)); EXPECT_EQ(args[1], std::string("from addr")); + // An explicitly-quoted empty argument must be preserved (not dropped), otherwise + // later positional RPC params silently shift by one (F14-1). + auto emptyArgs = dragonx::ui::ParseConsoleCommandArgs("walletpassphrase \"\" 60"); + EXPECT_EQ(emptyArgs.size(), static_cast(3)); + EXPECT_EQ(emptyArgs[1], std::string("")); + EXPECT_EQ(emptyArgs[2], std::string("60")); auto call = dragonx::ui::BuildConsoleRpcCall("setgenerate true 4"); EXPECT_TRUE(call.valid); EXPECT_EQ(call.method, std::string("setgenerate"));