test: don't rely on FLAC compression being available

This commit is contained in:
Marcus Holland-Moritz 2024-05-04 14:35:06 +02:00
parent 793f87125a
commit 21901d7c2d

View File

@ -1774,9 +1774,10 @@ TEST(mkdwarfs_test, output_file_fail_close) {
EXPECT_THAT(t.err(), ::testing::HasSubstr("failed to close output file")); EXPECT_THAT(t.err(), ::testing::HasSubstr("failed to close output file"));
} }
#if DWARFS_HAVE_RICEPP
TEST(mkdwarfs_test, compression_cannot_be_used_without_category) { TEST(mkdwarfs_test, compression_cannot_be_used_without_category) {
mkdwarfs_tester t; mkdwarfs_tester t;
EXPECT_NE(0, t.run({"-i", "/", "-o", "-", "-C", "flac"})); EXPECT_NE(0, t.run({"-i", "/", "-o", "-", "-C", "ricepp"}));
EXPECT_THAT(t.err(), EXPECT_THAT(t.err(),
::testing::HasSubstr("cannot be used without a category")); ::testing::HasSubstr("cannot be used without a category"));
} }
@ -1784,11 +1785,12 @@ TEST(mkdwarfs_test, compression_cannot_be_used_without_category) {
TEST(mkdwarfs_test, compression_cannot_be_used_for_category) { TEST(mkdwarfs_test, compression_cannot_be_used_for_category) {
mkdwarfs_tester t; mkdwarfs_tester t;
EXPECT_NE(0, t.run({"-i", "/", "-o", "-", "--categorize", "-C", EXPECT_NE(0, t.run({"-i", "/", "-o", "-", "--categorize", "-C",
"incompressible::flac"})); "incompressible::ricepp"}));
EXPECT_THAT(t.err(), ::testing::HasSubstr( EXPECT_THAT(t.err(), ::testing::HasSubstr(
"cannot be used for category 'incompressible': " "cannot be used for category 'incompressible': "
"metadata requirements not met")); "metadata requirements not met"));
} }
#endif
class mkdwarfs_progress_test : public testing::TestWithParam<char const*> {}; class mkdwarfs_progress_test : public testing::TestWithParam<char const*> {};