@@ -5495,12 +5495,12 @@ void TestQgsProcessing::parameterFileOut()
5495
5495
QCOMPARE ( QgsProcessingParameters::parameterAsFileOutput ( def.get (), params, context ), QStringLiteral ( " test.txt" ) );
5496
5496
5497
5497
params.insert ( QStringLiteral ( " non_optional" ), QgsProcessing::TEMPORARY_OUTPUT );
5498
- QCOMPARE ( QgsProcessingParameters::parameterAsFileOutput ( def.get (), params, context ).right ( 7 ), QStringLiteral ( " _OUTPUT " ) );
5498
+ QCOMPARE ( QgsProcessingParameters::parameterAsFileOutput ( def.get (), params, context ).right ( 18 ), QStringLiteral ( " /non_optional.file " ) );
5499
5499
5500
5500
QgsProcessingOutputLayerDefinition fs;
5501
5501
fs.sink = QgsProperty::fromValue ( QgsProcessing::TEMPORARY_OUTPUT );
5502
5502
params.insert ( QStringLiteral ( " non_optional" ), QVariant::fromValue ( fs ) );
5503
- QCOMPARE ( QgsProcessingParameters::parameterAsFileOutput ( def.get (), params, context ).right ( 7 ), QStringLiteral ( " _OUTPUT " ) );
5503
+ QCOMPARE ( QgsProcessingParameters::parameterAsFileOutput ( def.get (), params, context ).right ( 18 ), QStringLiteral ( " /non_optional.file " ) );
5504
5504
5505
5505
QCOMPARE ( def->valueAsPythonString ( QVariant (), context ), QStringLiteral ( " None" ) );
5506
5506
QCOMPARE ( def->valueAsPythonString ( QStringLiteral ( " abc" ), context ), QStringLiteral ( " 'abc'" ) );
@@ -5656,6 +5656,10 @@ void TestQgsProcessing::parameterFolderOut()
5656
5656
QCOMPARE ( fromCode->description (), QStringLiteral ( " optional" ) );
5657
5657
QCOMPARE ( fromCode->flags (), def->flags () );
5658
5658
QCOMPARE ( fromCode->defaultValue (), def->defaultValue () );
5659
+
5660
+ // temporary directory
5661
+ def.reset ( new QgsProcessingParameterFolderDestination ( " junkdir" , QString (), QgsProcessing::TEMPORARY_OUTPUT ) );
5662
+ QCOMPARE ( QgsProcessingParameters::parameterAsString ( def.get (), params, context ).right ( 8 ), QStringLiteral ( " /junkdir" ) );
5659
5663
}
5660
5664
5661
5665
void TestQgsProcessing::parameterBand ()
0 commit comments