[libcalamares] Extend tests to handle case-insensitive

This commit is contained in:
Adriaan de Groot 2021-02-08 14:46:34 +01:00
parent f3681a533e
commit 48541629f9

View File

@ -199,6 +199,16 @@ PartitionServiceTests::testFilesystemGS()
const auto map = gs.value( "filesystem_use" ).toMap();
QCOMPARE( map.count(), fsNames.count() + 1 );
}
// The API says that it it case-insensitive
QVERIFY( !isFilesystemUsedGS( &gs, "ZFS" ) );
QVERIFY( isFilesystemUsedGS( &gs, "EXT4" ) );
QCOMPARE( isFilesystemUsedGS( &gs, "ZFS" ), isFilesystemUsedGS( &gs, "zfs" ) );
QCOMPARE( isFilesystemUsedGS( &gs, "EXT4" ), isFilesystemUsedGS( &gs, "ext4" ) );
useFilesystemGS( &gs, "EXT4", false );
QVERIFY( !isFilesystemUsedGS( &gs, "EXT4" ) );
QCOMPARE( isFilesystemUsedGS( &gs, "EXT4" ), isFilesystemUsedGS( &gs, "ext4" ) );
}