File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 12
12
#include < qt/rpcconsole.h>
13
13
#include < shutdown.h>
14
14
#include < test/util/setup_common.h>
15
- #include < univalue.h>
16
15
#include < validation.h>
17
16
18
17
#if defined(HAVE_CONFIG_H)
24
23
#include < QRegularExpression>
25
24
#include < QScopedPointer>
26
25
#include < QSignalSpy>
26
+ #include < QString>
27
27
#include < QTest>
28
28
#include < QTextEdit>
29
29
#include < QtGlobal>
@@ -49,10 +49,9 @@ void TestRpcCommand(RPCConsole* console)
49
49
QTest::keyClick (lineEdit, Qt::Key_Return);
50
50
QVERIFY (mw_spy.wait (1000 ));
51
51
QCOMPARE (mw_spy.count (), 4 );
52
- QString output = messagesWidget->toPlainText ();
53
- UniValue value;
54
- value.read (output.right (output.size () - output.lastIndexOf (QChar::ObjectReplacementCharacter) - 1 ).toStdString ());
55
- QCOMPARE (value[" chain" ].get_str (), std::string (" regtest" ));
52
+ const QString output = messagesWidget->toPlainText ();
53
+ const QString pattern = QStringLiteral (" \" chain\" : \" (\\ w+)\" " );
54
+ QCOMPARE (FindInConsole (output, pattern), QString (" regtest" ));
56
55
}
57
56
} // namespace
58
57
You can’t perform that action at this time.
0 commit comments