File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1212#include < qt/rpcconsole.h>
1313#include < shutdown.h>
1414#include < test/util/setup_common.h>
15- #include < univalue.h>
1615#include < validation.h>
1716
1817#if defined(HAVE_CONFIG_H)
@@ -48,10 +47,9 @@ void TestRpcCommand(RPCConsole* console)
4847 QTest::keyClicks (lineEdit, " getblockchaininfo" );
4948 QTest::keyClick (lineEdit, Qt::Key_Return);
5049 loop.exec ();
51- QString output = messagesWidget->toPlainText ();
52- UniValue value;
53- value.read (output.right (output.size () - output.lastIndexOf (QChar::ObjectReplacementCharacter) - 1 ).toStdString ());
54- QCOMPARE (value[" chain" ].get_str (), std::string (" regtest" ));
50+ const QString output = messagesWidget->toPlainText ();
51+ const QString pattern = " \" chain\" : \" (\\ w+)\" " ;
52+ QCOMPARE (FindInConsole (output, pattern), " regtest" );
5553}
5654} // namespace
5755
You can’t perform that action at this time.
0 commit comments