mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-14 10:51:27 +02:00
test, qt: Add tests for GUIUtil::extractFirstSuffixFromFilter
This commit is contained in:
parent
ace9af5688
commit
67364ebe4c
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <qt/bitcoin.h>
|
#include <qt/bitcoin.h>
|
||||||
|
#include <qt/guiutil.h>
|
||||||
#include <qt/test/optiontests.h>
|
#include <qt/test/optiontests.h>
|
||||||
#include <test/util/setup_common.h>
|
#include <test/util/setup_common.h>
|
||||||
#include <util/system.h>
|
#include <util/system.h>
|
||||||
@ -122,3 +123,12 @@ void OptionTests::parametersInteraction()
|
|||||||
QVERIFY(!settings.contains("fListen"));
|
QVERIFY(!settings.contains("fListen"));
|
||||||
gArgs.ClearPathCache();
|
gArgs.ClearPathCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OptionTests::extractFilter()
|
||||||
|
{
|
||||||
|
QString filter = QString("Partially Signed Transaction (Binary) (*.psbt)");
|
||||||
|
QCOMPARE(GUIUtil::ExtractFirstSuffixFromFilter(filter), "psbt");
|
||||||
|
|
||||||
|
filter = QString("Image (*.png *.jpg)");
|
||||||
|
QCOMPARE(GUIUtil::ExtractFirstSuffixFromFilter(filter), "png");
|
||||||
|
}
|
||||||
|
@ -22,6 +22,7 @@ private Q_SLOTS:
|
|||||||
void migrateSettings();
|
void migrateSettings();
|
||||||
void integerGetArgBug();
|
void integerGetArgBug();
|
||||||
void parametersInteraction();
|
void parametersInteraction();
|
||||||
|
void extractFilter();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
interfaces::Node& m_node;
|
interfaces::Node& m_node;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user