diff --git a/tests/multiboot2_header_example1.h b/tests/multiboot2_header_example1.h index bb9ab7c..0cb0c43 100644 --- a/tests/multiboot2_header_example1.h +++ b/tests/multiboot2_header_example1.h @@ -1 +1,15 @@ -static const uint8_t multiboot2_header_example1[1] = { 0 }; +// TODO: do we really need this? +static const uint8_t multiboot2_header_example1[] = { + 214, 80, 82, 232, 0, 0, 0, 0, 16, 1, 0, 0, 26, 174, 173, 23, 1, 0, 0, 0, 96, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, + 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, + 0, 12, 0, 0, 0, 13, 0, 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 16, 0, 0, 0, 17, 0, + 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 2, 0, 0, 0, 24, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 12, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 8, 0, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, + 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, +}; diff --git a/tests/test_multiboot2_header_print.c b/tests/test_multiboot2_header_print.c index fa0bae9..37138b4 100644 --- a/tests/test_multiboot2_header_print.c +++ b/tests/test_multiboot2_header_print.c @@ -7,10 +7,7 @@ #define __USE_POSIX2 #include -// static const char output1[] = ""; - -// TODO: add more tags -static const char output2[] = +static const char output[] = "Multiboot 2 header\n" " magic: 3897708758\n" " arch: 0 (i386)\n" @@ -63,25 +60,23 @@ static const char output2[] = int main() { - /* { FILE *const fd = popen("tests/multiboot2_header_print1", "r"); assert(fd != NULL); - for (const char *ch = output1; *ch; ++ch) { + for (const char *ch = output; *ch; ++ch) { assert(fgetc(fd) == *ch); } const int status = pclose(fd); assert(status == 0); } - */ { FILE *const fd = popen("tests/multiboot2_header_print2", "r"); assert(fd != NULL); - for (const char *ch = output2; *ch; ++ch) { + for (const char *ch = output; *ch; ++ch) { assert(fgetc(fd) == *ch); }