Skip to content
Permalink
Browse files

[processing] add test for temporary output without extension

  • Loading branch information
alexbruy authored and nyalldawson committed May 19, 2018
1 parent 303a79a commit cce49567ca079aec9d758b6e0d9fd84a34c18617
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/src/analysis/testqgsprocessing.cpp
@@ -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" ) );

0 comments on commit cce4956

Please sign in to comment.
You can’t perform that action at this time.