Skip to content

Commit

Permalink
test: test mkdwarfs with --progress=simple and --progress=ascii
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Dec 22, 2023
1 parent 5cd91a0 commit 03a9d9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/dwarfs_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ TEST_P(tools_test, end_to_end) {
folly::test::TemporaryDirectory tempdir("dwarfs");
auto td = fs::path(tempdir.path().string());
auto image = td / "test.dwarfs";
auto image2 = td / "test2.dwarfs";
auto image_hdr = td / "test_hdr.dwarfs";
auto fsdata_dir = td / "fsdata";
auto header_data = fsdata_dir / "format.sh";
Expand Down Expand Up @@ -700,6 +701,20 @@ TEST_P(tools_test, end_to_end) {
ASSERT_TRUE(fs::exists(image));
ASSERT_GT(fs::file_size(image), 1000);

ASSERT_TRUE(subprocess::check_run(*mkdwarfs_test_bin, mkdwarfs_tool_arg, "-i",
fsdata_dir, "-o", image2,
"--progress=simple"));

ASSERT_TRUE(fs::exists(image2));
ASSERT_GT(fs::file_size(image2), 1000);

ASSERT_TRUE(subprocess::check_run(*mkdwarfs_test_bin, mkdwarfs_tool_arg, "-i",
fsdata_dir, "-o", image2,
"--progress=ascii", "--force"));

ASSERT_TRUE(fs::exists(image2));
ASSERT_GT(fs::file_size(image2), 1000);

ASSERT_TRUE(subprocess::check_run(
*mkdwarfs_test_bin, mkdwarfs_tool_arg, "-i", image, "-o", image_hdr,
"--no-progress", "--recompress=none", "--header", header_data));
Expand Down

0 comments on commit 03a9d9c

Please sign in to comment.