libmpm

morphux C package management library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/libmpm

commit e6ae59b6a395dfc86034aad0ac3544d2aef72944
parent 7b78b66be283e1ed461db87990ea02d229746815
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed, 10 May 2017 17:02:33 +0200

Add(Tests): Cleanup after tests

Diffstat:
Mtests/test_packer.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/test_packer.c b/tests/test_packer.c @@ -638,7 +638,14 @@ TEST(packer_extract_archive_2) { ctx = packer_init_archive(PACKAGE_OUTPUT_FN); set_mkdir_fail(1); TEST_ASSERT(packer_extract_archive(ctx, "/tmp", &output_dir) == false, "Error did not raise"); + + char *to_del = NULL; + + asprintf(&to_del, "/tmp/%s", output_dir); + TEST_ASSERT(recursive_delete(to_del) == true, "Cannot delete directory") + free(output_dir); + free(to_del); packer_free(ctx);