Skip to content

Commit

Permalink
[processing] add test for temporary output without extension
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy authored and nyalldawson committed May 20, 2018
1 parent 303a79a commit cce4956
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/src/analysis/testqgsprocessing.cpp
Expand Up @@ -4762,6 +4762,10 @@ void TestQgsProcessing::parameterFolderOut()
QVERIFY( def->checkValueIsAcceptable( "c:/Users/admin/Desktop/" ) );
QVERIFY( def->checkValueIsAcceptable( "c:/Users/admin/Desktop/", &context ) );

// check that temporary destination does not have dot at the end when there is no extension
QVERIFY( !def->generateTemporaryDestination().endsWith( QStringLiteral( "." ) ) );
QVERIFY( def->generateTemporaryDestination().startsWith( QgsProcessingUtils::tempFolder() ) );

QVariantMap params;
params.insert( "non_optional", "c:/mine" );
QCOMPARE( QgsProcessingParameters::parameterAsFileOutput( def.get(), params, context ), QStringLiteral( "c:/mine" ) );
Expand Down

0 comments on commit cce4956

Please sign in to comment.