New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Qt] Console: allow empty arguments #9329
[Qt] Console: allow empty arguments #9329
Conversation
Maybe add a unit test to check this case? |
This doesn't appear to actually fix the problem at all: luke-jr@3710cf3 |
147bd85
to
6a32c0f
Compare
Added @luke-jr's unit test, added some more fixes. |
Here's a few more, including one that fails: RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,abc)");
QVERIFY(result == "[\"abc\",\"\",\"abc\"]");
RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,)"); // this one fails
QVERIFY(result == "[\"abc\",\"\",\"\"]");
RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc )");
QVERIFY(result == "[\"abc\"]");
RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest( abc)");
QVERIFY(result == "[\"abc\"]"); |
Added more rules and tests.
|
Makes sense, I think. |
Github-Pull: bitcoin#9329 Rebased-From: 89c8d2c
Github-Pull: bitcoin#9329 Rebased-From: 6a32c0f
Github-Pull: bitcoin#9329 Rebased-From: 390bd14
47607df [Qt] Console: don't allow empty arguments when using the comma-syntax (random-zebra) af215ef [Qt] Console: allow empty arguments (random-zebra) Pull request description: #2372 broke the support for empty arguments `""` (which is required as first argument of `sendmany`). Backport the fix from bitcoin#9329 Thanks to @NoobieDev12 for reporting this bug. ACKs for top commit: furszy: Nice catch👌, ACK 47607df Fuzzbawls: ACK 47607df Tree-SHA512: 9ebcce3fbcb10856fc0a586365a9f0c4a3bbed5df571f21b37a143a882ab937b0fdf0502d1ba39e015cc0f745b07ed78fa8eb547110d0e53401f0d88af89cba1
Should fix #9210 and re-allow empty arguments like
command '' <more arg...>
orcommand "" <more args...>
.