mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
16 lines
376 B
C
16 lines
376 B
C
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
int main(void) {
|
|
// Raw bytes; not a C string
|
|
const char data[] = {
|
|
#embed <foo.data>
|
|
};
|
|
const char *expected = "This text is the contents of foo.data";
|
|
if (sizeof data == strlen(expected) && memcmp(data, expected, sizeof data) == 0) {
|
|
return EXIT_SUCCESS;
|
|
} else {
|
|
return EXIT_FAILURE;
|
|
}
|
|
}
|