[Qt] Console: allow empty arguments #9329

pull jonasschnelli wants to merge 3 commits into bitcoin:master from jonasschnelli:2016/12/fix_qt_empty_args changing 2 files +72 −21
  1. jonasschnelli commented at 2:43 PM on December 12, 2016: contributor

    Should fix #9210 and re-allow empty arguments like command '' <more arg...> or command "" <more args...>.

  2. jonasschnelli added the label GUI on Dec 12, 2016
  3. luke-jr commented at 10:24 PM on December 12, 2016: member

    Maybe add a unit test to check this case?

  4. luke-jr commented at 11:04 PM on December 12, 2016: member

    This doesn't appear to actually fix the problem at all: https://github.com/luke-jr/bitcoin/commit/3710cf35cd9bf2106a8c75d065ebc5c6f35b37a5

  5. [Qt] Console: allow empty arguments 89c8d2c12c
  6. Qt/Test: Check handling of empty arguments in RPC debug console 6a32c0f69d
  7. jonasschnelli force-pushed on Dec 13, 2016
  8. jonasschnelli commented at 8:18 AM on December 13, 2016: contributor

    Added @luke-jr's unit test, added some more fixes.

  9. luke-jr commented at 10:03 AM on December 13, 2016: member

    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\"]");
    
  10. [Qt] Console: don't allow empty arguments when using the comma-syntax 390bd14684
  11. jonasschnelli commented at 8:06 AM on December 14, 2016: contributor

    Added more rules and tests. Now, empty arguments are no longer supported when using the comma-syntax. Examples

    • [NOK] command <arg0>,,<arg2>
    • [OK] command <arg0>,"",<arg2>
    • [NOK] command(<arg0>,,<arg2>)
    • [NOK] command(<arg0>,)
    • [OK] command <arg0> "" <arg2>
    • [OK] command( <arg0> , <arg2> )
  12. laanwj commented at 4:08 PM on December 15, 2016: member

    Now, empty arguments are no longer supported when using the comma-syntax.

    Makes sense, I think. Thanks for adding tests :) code-review-ACK 413ce40

  13. laanwj requested review from laanwj on Dec 15, 2016
  14. laanwj approved
  15. laanwj merged this on Dec 19, 2016
  16. laanwj closed this on Dec 19, 2016

  17. laanwj referenced this in commit db45ad8516 on Dec 19, 2016
  18. luke-jr referenced this in commit d63d8ab60d on Dec 21, 2016
  19. luke-jr referenced this in commit 4fce7fc0e8 on Dec 21, 2016
  20. luke-jr referenced this in commit 93bef6355a on Dec 21, 2016
  21. codablock referenced this in commit 6e11b14913 on Jan 18, 2018
  22. andvgal referenced this in commit 71c9a36707 on Jan 6, 2019
  23. CryptoCentric referenced this in commit 6d9a89446b on Feb 26, 2019
  24. furszy referenced this in commit ac4c11f26c on Aug 19, 2021
  25. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me