[libcalamares] Test more targetPath() scenario's
This commit is contained in:
parent
8d23e665ea
commit
394eee3954
@ -80,6 +80,13 @@ TestPaths::testTargetPath()
|
||||
QCOMPARE( m_system->targetPath( "/etc/calamares" ), QStringLiteral( "/tmp/etc/calamares" ) );
|
||||
QCOMPARE( m_system->targetPath( "//etc//calamares" ), QStringLiteral( "/tmp//etc//calamares" ) ); // extra / are not cleaned up
|
||||
QCOMPARE( m_system->targetPath( "etc/calamares" ), QStringLiteral( "/tmp/etc/calamares" ) ); // relative to root
|
||||
|
||||
// Weird Paths
|
||||
QCOMPARE( m_system->targetPath( QString() ), QStringLiteral( "/tmp/" ) );
|
||||
|
||||
// Now break GS
|
||||
Calamares::JobQueue::instance()->globalStorage()->remove( "rootMountPoint" );
|
||||
QCOMPARE( m_system->targetPath( QString() ), QString() ); // Without root, no path
|
||||
}
|
||||
|
||||
QTEST_GUILESS_MAIN( TestPaths )
|
||||
|
Loading…
Reference in New Issue
Block a user