| 1 | #include <gpgme.h> |
| 2 | #include <string.h> |
| 3 | |
| 4 | int main(void) |
| 5 | { |
| 6 | gpgme_data_t data; |
| 7 | char bytes[5]; |
| 8 | if (gpgme_check_version("1.24.1") == NULL || |
| 9 | gpgme_data_new_from_mem(&data, "Vinix", sizeof(bytes), 1)) |
| 10 | return 1; |
| 11 | const int failed = gpgme_data_read(data, bytes, sizeof(bytes)) != sizeof(bytes) || |
| 12 | memcmp(bytes, "Vinix", sizeof(bytes)) != 0; |
| 13 | gpgme_data_release(data); |
| 14 | return failed; |
| 15 | } |
| 16 |