mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 11:59:48 -04:00
test: add inode dumping test
This commit is contained in:
parent
86f0af2058
commit
4d1de7ddf2
@ -383,3 +383,18 @@ TEST(mkdwarfs_test, chmod_norm) {
|
||||
|
||||
EXPECT_EQ(expected_norm, norm);
|
||||
}
|
||||
|
||||
TEST(mkdwarfs_test, dump_inodes) {
|
||||
std::string const image_file = "test.dwarfs";
|
||||
std::string const inode_file = "inode.dump";
|
||||
|
||||
mkdwarfs_tester t;
|
||||
t.os->setenv("DWARFS_DUMP_INODES", inode_file);
|
||||
|
||||
EXPECT_EQ(0, t.run({"-i", "/", "-o", image_file}));
|
||||
|
||||
auto dump = t.fa->get_file(inode_file);
|
||||
|
||||
ASSERT_TRUE(dump);
|
||||
EXPECT_GT(dump->size(), 100) << dump.value();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user