@@ -61,8 +61,10 @@ void RPCNestedTests::rpcNestedTests()
61
61
62
62
std::string result;
63
63
std::string result2;
64
- RPCConsole::RPCExecuteCommandLine (result, " getblockchaininfo()[chain]" ); // simple result filtering with path
64
+ std::string filtered;
65
+ RPCConsole::RPCExecuteCommandLine (result, " getblockchaininfo()[chain]" , &filtered); // simple result filtering with path
65
66
QVERIFY (result==" main" );
67
+ QVERIFY (filtered == " getblockchaininfo()[chain]" );
66
68
67
69
RPCConsole::RPCExecuteCommandLine (result, " getblock(getbestblockhash())" ); // simple 2 level nesting
68
70
RPCConsole::RPCExecuteCommandLine (result, " getblock(getblock(getbestblockhash())[hash], true)" );
@@ -87,8 +89,30 @@ void RPCNestedTests::rpcNestedTests()
87
89
(RPCConsole::RPCExecuteCommandLine (result2, " createrawtransaction( [], {} , 0 )" )); // whitespace between parametres is allowed
88
90
QVERIFY (result == result2);
89
91
90
- RPCConsole::RPCExecuteCommandLine (result, " getblock(getbestblockhash())[tx][0]" );
92
+ RPCConsole::RPCExecuteCommandLine (result, " getblock(getbestblockhash())[tx][0]" , &filtered );
91
93
QVERIFY (result == " 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" );
94
+ QVERIFY (filtered == " getblock(getbestblockhash())[tx][0]" );
95
+
96
+ RPCConsole::RPCParseCommandLine (result, " importprivkey" , false , &filtered);
97
+ QVERIFY (filtered == " importprivkey(…)" );
98
+ RPCConsole::RPCParseCommandLine (result, " signmessagewithprivkey abc" , false , &filtered);
99
+ QVERIFY (filtered == " signmessagewithprivkey(…)" );
100
+ RPCConsole::RPCParseCommandLine (result, " signmessagewithprivkey abc,def" , false , &filtered);
101
+ QVERIFY (filtered == " signmessagewithprivkey(…)" );
102
+ RPCConsole::RPCParseCommandLine (result, " signrawtransaction(abc)" , false , &filtered);
103
+ QVERIFY (filtered == " signrawtransaction(…)" );
104
+ RPCConsole::RPCParseCommandLine (result, " walletpassphrase(help())" , false , &filtered);
105
+ QVERIFY (filtered == " walletpassphrase(…)" );
106
+ RPCConsole::RPCParseCommandLine (result, " walletpassphrasechange(help(walletpassphrasechange(abc)))" , false , &filtered);
107
+ QVERIFY (filtered == " walletpassphrasechange(…)" );
108
+ RPCConsole::RPCParseCommandLine (result, " help(encryptwallet(abc, def))" , false , &filtered);
109
+ QVERIFY (filtered == " help(encryptwallet(…))" );
110
+ RPCConsole::RPCParseCommandLine (result, " help(importprivkey())" , false , &filtered);
111
+ QVERIFY (filtered == " help(importprivkey(…))" );
112
+ RPCConsole::RPCParseCommandLine (result, " help(importprivkey(help()))" , false , &filtered);
113
+ QVERIFY (filtered == " help(importprivkey(…))" );
114
+ RPCConsole::RPCParseCommandLine (result, " help(importprivkey(abc), walletpassphrase(def))" , false , &filtered);
115
+ QVERIFY (filtered == " help(importprivkey(…), walletpassphrase(…))" );
92
116
93
117
RPCConsole::RPCExecuteCommandLine (result, " rpcNestedTest" );
94
118
QVERIFY (result == " []" );
0 commit comments