From 7b7b3d7ce34cb570f3bf750e9fd39612fcb1cdc9 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Thu, 13 Jan 2022 19:55:24 +0500 Subject: [PATCH] Write test --- tests/test_multiboot2_header_print.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/test_multiboot2_header_print.c b/tests/test_multiboot2_header_print.c index 322d6c3..bd2a186 100644 --- a/tests/test_multiboot2_header_print.c +++ b/tests/test_multiboot2_header_print.c @@ -7,11 +7,23 @@ #define __USE_POSIX2 #include -static const char output1[] = ""; -static const char output2[] = ""; +// static const char output1[] = ""; + +// TODO: add more tags +static const char output2[] = + "Multiboot 2 header\n" + " magic: 920085129\n" + " arch: 1\n" + " size: 24\n" + " checksum: 3374882142\n" + "Multiboot 2 header tag\n" + " type: 0 (none)\n" + " flags: 0\n" + " size: 8\n"; int main() { + /* { FILE *const fd = popen("tests/multiboot2_header_print1", "r"); assert(fd != NULL); @@ -23,6 +35,7 @@ int main() const int status = pclose(fd); assert(status == 0); } + */ { FILE *const fd = popen("tests/multiboot2_header_print2", "r");