From b635c78530d5d7f27f9805790c1f7ca227959177 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 12 Feb 2023 12:28:40 +0100 Subject: libtar: Add a test for the tar writing code Generate a simple tarball and compare it with a reference. Signed-off-by: David Oberhollenzer --- bin/gensquashfs/test/fstree_glob1.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin/gensquashfs') diff --git a/bin/gensquashfs/test/fstree_glob1.c b/bin/gensquashfs/test/fstree_glob1.c index 5f4fdfe..2d3cb80 100644 --- a/bin/gensquashfs/test/fstree_glob1.c +++ b/bin/gensquashfs/test/fstree_glob1.c @@ -200,6 +200,13 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive) TEST_NULL(n->data.dir.children); } + n = n->next; + TEST_NOT_NULL(n); + TEST_STR_EQUAL(n->name, "write"); + TEST_ASSERT(S_ISDIR(n->mode)); + TEST_ASSERT(n->parent == parentdir); + TEST_NULL(n->data.dir.children); + n = n->next; TEST_NOT_NULL(n); TEST_STR_EQUAL(n->name, "xattr"); -- cgit v1.2.3