Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 14, 2020
1 parent 0403db2 commit b4fdcec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/src/core/testqgsproject.cpp
Expand Up @@ -487,10 +487,15 @@ void TestQgsProject::testEmbeddedLayerGroupFromQgz()
QCOMPARE( p1.layerIsEmbedded( points->id() ), path );
QCOMPARE( p1.layerIsEmbedded( polys->id() ), path );

// relative path
// test embeded layers when origin project is something like ../XXX
path = QString( TEST_DATA_DIR ) + QStringLiteral( "/embedded_layers/project.qgz" );
QgsProject p2;
p2.read( path );

QgsMapLayer *points2 = p0.mapLayersByName( "points" )[0];
bool saveFlag = p2.mEmbeddedLayers[points2->id()].second;
QCOMPARE( saveFlag, true );

bool valid = p2.loadEmbeddedNodes( p2.layerTreeRoot() );
QCOMPARE( valid, true );
}
Expand Down

0 comments on commit b4fdcec

Please sign in to comment.