From 262fc48eb9e246ddb7315f5a14e7f6f58ca987c1 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 13 Dec 2019 15:47:35 +0100 Subject: Better support for reading/writing non-ASCII xattr values from/to tar Signed-off-by: David Oberhollenzer --- tests/tar_xattr_bsd.c | 3 ++- tests/tar_xattr_schily.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/tar_xattr_bsd.c b/tests/tar_xattr_bsd.c index dcaba1e..0741511 100644 --- a/tests/tar_xattr_bsd.c +++ b/tests/tar_xattr_bsd.c @@ -54,7 +54,8 @@ int main(void) assert(hdr.xattr != NULL); assert(strcmp(hdr.xattr->key, "user.mime_type") == 0); - assert(strcmp(hdr.xattr->value, "text/plain") == 0); + assert(strcmp((const char *)hdr.xattr->value, "text/plain") == 0); + assert(hdr.xattr->value_len == 10); assert(hdr.xattr->next == NULL); clear_header(&hdr); diff --git a/tests/tar_xattr_schily.c b/tests/tar_xattr_schily.c index 6cc31f5..f562b43 100644 --- a/tests/tar_xattr_schily.c +++ b/tests/tar_xattr_schily.c @@ -54,7 +54,8 @@ int main(void) assert(hdr.xattr != NULL); assert(strcmp(hdr.xattr->key, "user.mime_type") == 0); - assert(strcmp(hdr.xattr->value, "text/plain") == 0); + assert(strcmp((const char *)hdr.xattr->value, "text/plain") == 0); + assert(hdr.xattr->value_len == 10); assert(hdr.xattr->next == NULL); clear_header(&hdr); -- cgit v1.2.3