mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-22 22:48:57 +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 <qt/bitcoin.h>
|
||||
#include <qt/guiutil.h>
|
||||
#include <qt/test/optiontests.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/system.h>
|
||||
@ -122,3 +123,12 @@ void OptionTests::parametersInteraction()
|
||||
QVERIFY(!settings.contains("fListen"));
|
||||
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 integerGetArgBug();
|
||||
void parametersInteraction();
|
||||
void extractFilter();
|
||||
|
||||
private:
|
||||
interfaces::Node& m_node;
|
||||
|
Loading…
x
Reference in New Issue
Block a user