From f0cb6b2246347fd1e6298240ba2a91c121017a48 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Fri, 12 Aug 2022 03:41:04 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Adjust=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit-initcpio.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/unit-initcpio.cpp b/tests/unit-initcpio.cpp index f5e994d..af12389 100644 --- a/tests/unit-initcpio.cpp +++ b/tests/unit-initcpio.cpp @@ -57,12 +57,20 @@ int main() { // Insert data. initcpio.append_module("radeon"); initcpio.append_hook("btrfs"); - initcpio.modules.insert(initcpio.modules.end(), {"crc32c-intel"}); + initcpio.append_module("crc32c-intel"); initcpio.hooks.insert(initcpio.hooks.end(), {"usr", "lvm2", "zfs"}); // Write data. assert(initcpio.write()); + // Checking insertion of equal items + initcpio.append_module("radeon"); + initcpio.append_hook("btrfs"); + initcpio.append_module("crc32c-intel"); + + // Write data. + assert(initcpio.write()); + // Check if file is equal to test data. // "\n# MODULES\nMODULES=(crc32c-intel)\n\n# BINARIES\nBINARIES=()\n\n# FILES\nFILES=()\n\n# HOOKS\nHOOKS=(base usr lvm2 zfs)"\n const auto& file_content = utils::read_whole_file(filename);