qt: Add test for DN parser
* qt/tests/t-various.cpp (testDN): New.
--
A simple test for the DN parser that would have caught
the new / free mismatch fixed in 9d5048d4
.
This commit is contained in:
parent
9d5048d474
commit
43aa3eed15
@ -42,6 +42,7 @@
|
|||||||
#include "keylistresult.h"
|
#include "keylistresult.h"
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "engineinfo.h"
|
#include "engineinfo.h"
|
||||||
|
#include "dn.h"
|
||||||
|
|
||||||
#include "t-support.h"
|
#include "t-support.h"
|
||||||
|
|
||||||
@ -56,6 +57,15 @@ Q_SIGNALS:
|
|||||||
void asyncDone();
|
void asyncDone();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void testDN()
|
||||||
|
{
|
||||||
|
DN dn(QStringLiteral("CN=Before\\0DAfter,OU=Test,DC=North America,DC=Fabrikam,DC=COM"));
|
||||||
|
QVERIFY(dn.dn() == QStringLiteral("CN=Before\rAfter,OU=Test,DC=North America,DC=Fabrikam,DC=COM"));
|
||||||
|
QStringList attrOrder;
|
||||||
|
attrOrder << QStringLiteral("DC") << QStringLiteral("OU") << QStringLiteral("CN");
|
||||||
|
dn.setAttributeOrder(attrOrder);
|
||||||
|
QVERIFY(dn.prettyDN() == QStringLiteral("DC=North America,DC=Fabrikam,DC=COM,OU=Test,CN=Before\rAfter"));
|
||||||
|
}
|
||||||
|
|
||||||
void testQuickUid()
|
void testQuickUid()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user