mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-01-23 22:42:31 +08:00
🔧 Adjust tests
This commit is contained in:
parent
b8adedf529
commit
f0cb6b2246
@ -57,12 +57,20 @@ int main() {
|
|||||||
// Insert data.
|
// Insert data.
|
||||||
initcpio.append_module("radeon");
|
initcpio.append_module("radeon");
|
||||||
initcpio.append_hook("btrfs");
|
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"});
|
initcpio.hooks.insert(initcpio.hooks.end(), {"usr", "lvm2", "zfs"});
|
||||||
|
|
||||||
// Write data.
|
// Write data.
|
||||||
assert(initcpio.write());
|
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.
|
// 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
|
// "\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);
|
const auto& file_content = utils::read_whole_file(filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user