Skip to content

Commit

Permalink
add tests for field restriction in active layer locator filter (#38692)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 11, 2020
1 parent 14ef69f commit fdb8ff3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/src/app/testqgsapplocatorfilters.cpp
Expand Up @@ -180,6 +180,15 @@ void TestQgsAppLocatorFilters::testSearchActiveLayer()
results = gatherResults( &filter, QStringLiteral( "nice" ), context );
QCOMPARE( results.count(), 1 );

results = gatherResults( &filter, QStringLiteral( "@my_text nice" ), context );
QCOMPARE( results.count(), 1 );

results = gatherResults( &filter, QStringLiteral( "@my_integer nice" ), context );
QCOMPARE( results.count(), 0 );

results = gatherResults( &filter, QStringLiteral( "@unknown_field nice" ), context );
QCOMPARE( results.count(), 0 );

QgsProject::instance()->removeAllMapLayers();
}

Expand Down

0 comments on commit fdb8ff3

Please sign in to comment.