aboutsummaryrefslogtreecommitdiff
path: root/test/standalone/c_embed_path/test.c
blob: b2dc2f6210599db5ba6fbd0e700f683bf34054e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

#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;
    }
}