libmpm

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

commit b15aa0cade0879db010cead6314f70950fbf3af6
parent ec48a967f130dfe3ffc2063a1f70a72b43ac207e
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Fri, 31 Mar 2017 18:57:46 +0200

Add(Tests): Add more test for packer directory reading (No conf file)

Diffstat:
Atests/packer/wrong/nothing | 0
Mtests/test_packer.c | 10++++++++++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/packer/wrong/nothing b/tests/packer/wrong/nothing diff --git a/tests/test_packer.c b/tests/test_packer.c @@ -50,9 +50,19 @@ TEST(packer_read_dir_wrong_dir) { return TEST_SUCCESS; } +TEST(packer_read_dir_no_configuration) { + packer_t *ptr; + + ptr = packer_init_dir("packer/wrong/"); + TEST_ASSERT(packer_read_dir(ptr) == false, "Error not raised"); + packer_free(ptr); + return TEST_SUCCESS; +} + void register_test_packer(void) { reg_test("packer", packer_init_dir); reg_test("packer", packer_init_archive); reg_test("packer", packer_read_dir_wrong_type); reg_test("packer", packer_read_dir_wrong_dir); + reg_test("packer", packer_read_dir_no_configuration); }