summaryrefslogtreecommitdiffstats
path: root/tests/storagetest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/storagetest.cpp')
-rw-r--r--tests/storagetest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp
index 6341808..ebd9b8f 100644
--- a/tests/storagetest.cpp
+++ b/tests/storagetest.cpp
@@ -334,6 +334,21 @@ private slots:
334 QCOMPARE(numValues, 2); 334 QCOMPARE(numValues, 2);
335 } 335 }
336 336
337 void testFindSubstringKeysWithDuplicatesEnabled()
338 {
339 Sink::Storage store(testDataPath, dbName, Sink::Storage::ReadWrite);
340 auto transaction = store.createTransaction(Sink::Storage::ReadWrite);
341 auto db = transaction.openDatabase("test", nullptr, true);
342 db.write("sub","value1");
343 db.write("subsub","value2");
344 db.write("wubsub","value3");
345 int numValues = db.scan("sub", [&](const QByteArray &key, const QByteArray &value) -> bool {
346 return true;
347 }, nullptr, true);
348
349 QCOMPARE(numValues, 2);
350 }
351
337 void testKeySorting() 352 void testKeySorting()
338 { 353 {
339 Sink::Storage store(testDataPath, dbName, Sink::Storage::ReadWrite); 354 Sink::Storage store(testDataPath, dbName, Sink::Storage::ReadWrite);