libmpm

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

commit 9a5520207a79d1ec95d2ce6823ccf87c1020973e
parent a485eb808cbb90530531f67f246ce5a6b3251b2a
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Fri,  5 May 2017 19:29:00 +0200

Fix(Packer): Rename packer_read_archive -> packer_read_archive_in_memory

Diffstat:
Minc/packer.h | 4++--
Msrc/packer.c | 2+-
Mtests/test_packer.c | 8++++----
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/inc/packer.h b/inc/packer.h @@ -144,7 +144,7 @@ bool packer_read_dir(packer_t *ctx); bool packer_create_archive(packer_t *ctx, const char *archive_path); /*! - * \brief Read a .mpx archive + * \brief Read a .mpx archive, and stock it in memory * * \param[in] ctx Already initialized packer_t struct * @@ -152,6 +152,6 @@ bool packer_create_archive(packer_t *ctx, const char *archive_path); * * \return True on success, false on failure */ -bool packer_read_archive(packer_t *ctx); +bool packer_read_archive_in_memory(packer_t *ctx); #endif /* PACKER_H */ diff --git a/src/packer.c b/src/packer.c @@ -802,7 +802,7 @@ error: return false; } -bool packer_read_archive(packer_t *ctx) +bool packer_read_archive_in_memory(packer_t *ctx) { int fd; bool ret; diff --git a/tests/test_packer.c b/tests/test_packer.c @@ -362,7 +362,7 @@ TEST(packer_read_archive_1) { packer_t *ctx; ctx = packer_init_dir("./"); - TEST_ASSERT(packer_read_archive(ctx) == false, "Wrong return"); + TEST_ASSERT(packer_read_archive_in_memory(ctx) == false, "Wrong return"); packer_free(ctx); return TEST_SUCCESS; } @@ -371,7 +371,7 @@ TEST(packer_read_archive_2) { packer_t *ctx; ctx = packer_init_archive("/non/sense/path"); - TEST_ASSERT(packer_read_archive(ctx) == false, "Wrong return"); + TEST_ASSERT(packer_read_archive_in_memory(ctx) == false, "Wrong return"); packer_free(ctx); return TEST_SUCCESS; } @@ -380,7 +380,7 @@ TEST(packer_read_archive_3) { packer_t *ctx; ctx = packer_init_archive(PACKAGE_OUTPUT_FN); - TEST_ASSERT(packer_read_archive(ctx) == true, "Wrong return"); + TEST_ASSERT(packer_read_archive_in_memory(ctx) == true, "Wrong return"); packer_free(ctx); return TEST_SUCCESS; @@ -390,7 +390,7 @@ TEST(packer_read_archive_4) { packer_t *ctx; ctx = packer_init_archive("/bin/ls"); - TEST_ASSERT(packer_read_archive(ctx) == false, "Wrong return"); + TEST_ASSERT(packer_read_archive_in_memory(ctx) == false, "Wrong return"); packer_free(ctx); return TEST_SUCCESS; }