diff --git a/src/mkdwarfs_main.cpp b/src/mkdwarfs_main.cpp index a8efe334..b29e2e89 100644 --- a/src/mkdwarfs_main.cpp +++ b/src/mkdwarfs_main.cpp @@ -742,7 +742,7 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) { if (vm.count("input-list")) { if (vm.count("filter")) { - iol.err << "error: cannot use --input-list and --filter\n"; + iol.err << "error: cannot combine --input-list and --filter\n"; return 1; } diff --git a/test/tool_main_test.cpp b/test/tool_main_test.cpp index cf561681..47a894d6 100644 --- a/test/tool_main_test.cpp +++ b/test/tool_main_test.cpp @@ -545,3 +545,10 @@ TEST(mkdwarfs_test, block_size_too_large) { EXPECT_NE(0, t.run({"-i", "/", "-o", "-", "-S", "100"})); EXPECT_THAT(t.err(), ::testing::HasSubstr("block size must be between")); } + +TEST(mkdwarfs_test, cannot_combine_input_list_and_filter) { + auto t = mkdwarfs_tester::create_empty(); + EXPECT_NE(0, t.run({"--input-list", "-", "-o", "-", "-F", "+ *"})); + EXPECT_THAT(t.err(), + ::testing::HasSubstr("cannot combine --input-list and --filter")); +}