libmpm

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

commit c4e41b09536eb1a8023c57ccf6775f1fa59659d7
parent 2cc8d569b48fdb4db2eb024b7a5d1f6151448541
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 16 May 2017 15:54:32 +0200

Add(Tests): Forgotten tests

Diffstat:
Mtests/test_compile.c | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/test_compile.c b/tests/test_compile.c @@ -16,15 +16,24 @@ TEST(init_compile) { TEST(configure_package) { packer_t *ctx = packer_init_archive(PACKAGE_OUTPUT_FN); + compile_t *ptr = NULL; packer_extract_archive(ctx, "/tmp"); - TEST_ASSERT(configure_package(ctx) == true, "An error happened"); - TEST_ASSERT(make_package(ctx) == true, "An error happened"); + ptr = package_install_init(ctx); + TEST_ASSERT(ptr != NULL, "An error happened"); + TEST_ASSERT(configure_package(ptr) == true, "An error happened"); + TEST_ASSERT(make_package(ptr) == true, "An error happened"); + TEST_ASSERT(package_install_cleanup(ptr) == true, "An error happened"); return TEST_SUCCESS; } +TEST(compile_cleanup) { + unlink(PACKAGE_OUTPUT_FN); +} + void register_test_compile(void) { reg_test("compile", init_compile) reg_test("compile", configure_package); + reg_test("compile", compile_cleanup); }